Webiste: FLDb
Food Lovers Database(FLDb) is a collection of food Vlogs from Food Lovers TV
This repo contains code related to backend APIs that serves the frontend FLDB frontend. More info: https://fl-db.in/about
Install Node.js if you haven't already. From the root of the project folder, execute below command(s)
npm install
- Google API Key for querying Youtube, MAPS APIs with youtube, maps and places services enabled
- MongoDB connection string
- New Relic License key for monitoring
Create a .env
file at the root of the directory with values filled for below keys
MONGO_URI=<YOUR_MONGO_URI>
YOUTUBE_API_KEY=<YOUR_YOUTUBE_API_KEY>
PORT=<YOUR_PORT>
NEW_RELIC_APP_NAME=<NEW_RELIC_APP_NAME>
NEW_RELIC_LICENSE_KEY=<NEW_RELIC_LICENSE_KEY>
NODE_ENV=development | production
SECRET=<SOME_SECRET_STRING>
From the root of the project folder, execute below command(s)
npm start
npm install -g heroku
heroku login
heroku git:remote -a <project-name>
heroku config:set MONGO_URI="<YOUR_MONGO_URI>"
heroku config:set YOUTUBE_API_KEY="<YOUR_YOUTUBE_API_KEY>"
heroku config:set NEW_RELIC_APP_NAME="<NEW_RELIC_APP_NAME>"
heroku config:set NEW_RELIC_LICENSE_KEY="<NEW_RELIC_LICENSE_KEY>"
heroku config:set NODE_ENV=production
git add .
git commit -m "<commit-message>"
<!-- Only First time -->
heroku create
git push heroku <branch-name>
<!-- View logs -->
heroku logs --tail
Create a directory by name cert
under src directory and generate cert.pem and key.pem
openssl req -x509 -newkey rsa:2048 -keyout keytmp.pem -out cert.pem
openssl rsa -in keytmp.pem -out key.pem