My-First-Express-App

Steps to Create Express App

  1. Create a new repo in GitHUb with a READMe and Clone

  2. Open code in VSCode.

  3. Run npm init -y -- creates a package.json file -- go ahead and ACP

  4. Install Express App dependencies with npm i express supertest jest cors

  5. Add a .gitignore with node_modules

  6. heroku login

  7. git remote -v -- confirm you don't already have Heroku as a remote

  8. heroku create [appname]

  9. git remote -v -- note that heroku is now a remote.

  10. 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"
        }
  11. ACP the change to package.json

  12. 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)