cd back-end
npn run dev
the server will be available at http://localhost:3001
- 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/
cd back-end
heroku login
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]
git add .
git commit -m "make it fly"
git push heroku master
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
add your magic
Repeat steps 2,4,5