Meme API for Training Program
- logic: each file pertains to a specific node in your firebase database, logic is specific to that object (i.e. cat.js represents all db operations on a cat node)
- routers: each file pertains to a specific node in your firebase database, routing is specific to how you want client devices to interact with your database (i.e. /cats gets all cat objects)
- util: util files that assist with logic file operations (i.e. database wrapper methods you might need)
- download service key json file from firebase console
- make .env file as such:
export FIREBASE_PROJECT_ID="PUT PROJECT ID HERE"
export FIREBASE_CLIENT_EMAIL="PUT CLIENT EMAIL HERE"
export FIREBASE_PRIVATE_KEY="PUT PRIVATE KEY HERE"
export FIREBASE_DB_URL="https://<project id goes here>.firebaseio.com"
export FIREBASE_STORAGE_URL="<project id goes here>.appspot.com"
- create firebase account (sign in with google account)
- create app on firebase console
- activate facebook authenication
- download service key json file
- copy json fields over to .env file (see above instructions)
- Make sure you have latest version of node installed
- clone repo
- npm install
- source .env
- node index.js
- create heroku account
- create an app (Note: only payed dynos support 24/7 jobs so notifymeme wont work)
- connect your github repo with auto deploys for master pushes
- add environment variables (from .env file)
- manually deploy