Skip to content

Setting up Heroku app

hyperbotauthor edited this page Nov 21, 2020 · 12 revisions

Setting up Heroku app

Create Heroku app

Sign up to Heroku if you have not already.

Create a new app.

Create Oauth app at lichess

Visit https://lichess.org/account/oauth/app and click Register new OAuth app.

Fill in details as shown in the image and change listrawpoll to your app name everywhere.

Homepage URL should be ( change listrawpoll to your app name )

https://listrawpoll.herokuapp.com/auth/lichess

Callback URL should be ( change listrawpoll to your app name )

https://listrawpoll.herokuapp.com/auth/lichess/callback

Configure Heroku app

In the app's dashboard go to Settings and set config vars LICHESS_CLIENT_ID and LICHESS_CLIENT_SECRET to the ones of your lichess OAuth app.

Set config var SITE_HOST to the host of your app ( you can obtain this by changing listrawpoll in listrawpoll.herokuapp.com to your app name ).

Set config var MONGODB_URI as stated in https://github.com/hyperbotauthor/listrawpoll/wiki/Creating-a-MongoDb-account#creating-a-mongodb-account .

When everything was said and done, your Heroku config vars section should look like this ( of course BANNED_POLLS and BANNED_USERS can be empty )

Dont't forget to change listrawpoll underlined with green line to your actual app name.

Link GitHub account

In the Deploy tab link your forked repository to your app.

Enable Automatic Deploys and press Deploy Branch for the first deploy.

Your app is up and running now, you can open it with the Open app button.

Moderation

Ban poll

Config var BANNED_POLLS should be a space separated list of poll ids you want to ban. Poll id can be found in poll details on the page.

Ban user

Config var BANNED_USERS should be a space separated list of lichess usernames you want to ban.

Clone this wiki locally