Skip to content

Mr-SKR/fldb-apis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Food Lovers Database APIs

Webiste: FLDb

About

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

Project Setup

Install project dependencies

Install Node.js if you haven't already. From the root of the project folder, execute below command(s)

npm install

Obtain credentials

Configure credentials

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>

Run locally

From the root of the project folder, execute below command(s)

npm start

Deploy using Heroku (optional)

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 cert for hosting express on https on localhost (optional)

Guide

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

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published