As seen on covid.questbook.app
- NodeJS & NPM (Install Node & NPM])
- MongoDB running locally (Install MongoDB)
- Create a new Twitter App
- Select your newly created app here and tap on the Settings icon next to the app name
- On the settings tab, scroll to Authentication Settings and under Callback Urls add
http://localhost/oauth-any/twitter/callback
andhttps://<YOUR DOMAIN NAME>/oauth-any/twitter/callback
- Please note, above, only https is supported for all domains other than localhost. If you don't have https setup, see the HTTPS section below
- Go to the keys and tokens tab
- Tab Generate (or Regenerate) under Consumer Keys
- Copy the the
API Key
andAPI Secret Key
- Edit the
.env
file, and edit the following lines with the above copied strings
TWITTER_API_KEY=<API Key>
TWITTER_SECRET=<API Secret Key>
- Open google cloud console and create a new project
- Open the project and select create Oauth Client Id for this new app
- Application Type, select Web application
- Authorized redirect URI, add
http://localhost/oauth-any/google/callback
andhttps://<YOUR DOMAIN NAME>/oauth-any/google/callback
- Please note, above, only https is supported for all domains other than localhost. If you don't have https setup, please see the HTTPS section below
- Once created copy the
Client ID
andClient Secret
- Edit the
.env
file, change the following lines with the above copied strings
GOOGLE_API_KEY=<Client Id>
GOOGLE_SECRET=<Client Secret>
If you already have an instance of mongodb running, you can set the mongo connection db
MONGO_CONNECTION=<YOUR CONNECTION STRING>
- Generate HTTPS keys using letsencrypt.org
- Copy the generated
fullchain.pem
andprivkey.pem
to./sslcerts/
- Uncomment the last few lines related to https options on the
bin/www
file
The server is configured to run on port 80 and 443
npm install
sudo npm start