-
Create a new repo in GitHUb with a READMe and Clone
-
Open code in VSCode.
-
Run
npm init -y
-- creates apackage.json
file -- go ahead and ACP -
Install Express App dependencies with
npm i express supertest jest cors
-
Add a .gitignore with
node_modules
-
heroku login
-
git remote -v
-- confirm you don't already have Heroku as a remote -
heroku create [appname]
-
git remote -v
-- note that heroku is now a remote. -
add a script to your package.json so that heroku knows how to start your app
"scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 1" }
-
ACP the change to package.json
-
Deploy the code using
git push heroku main
(if you are on the main branch)git push heroku dev:main
(id you are on the dev branch)