Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.38 KB

README.md

File metadata and controls

66 lines (43 loc) · 1.38 KB

starter api

run dev server locally

cd back-end
npn run dev

the server will be available at http://localhost:3001

deploy on Heroku

  • Sign up for a Heroku account here if you don't already have an account.
  • Create a new app for the back-end. It will be available at https://[BACKEND-APP-NAME].herokuapp.com/

login

cd back-end
heroku login

1. setup Heroku repository

setup the local repository

git init

replace [BACKEND-APP-NAME] below with your backend-end app name

(eg: $ heroku git:remote -a pacific-temple-api)

heroku git:remote -a [BACKEND-APP-NAME]

2. ship it

git add .
git commit -m "make it fly"
git push heroku master

3. CORS

Set the ALLOW_ORIGIN environment variable to your deployed front-end

replace [FRONTEND-APP-NAME] below with your front-end app name

(eg: heroku config:set ALLOW_ORIGIN=https://pacific-temple-58446.herokuapp.com)

heroku config:set ALLOW_ORIGIN=https://[FRONTEND-APP-NAME].herokuapp.com

4. make it so

add your magic

5. relax, take a break, eat, sleep, be kind to you and others ❤️

Repeat steps 2,4,5