At command line:
npm init
npm install express ejs --save
touch app.js
mkdir views
touch views/home.ejs
touch views/about.ejs
Built-in if using cloud9, installation required if using codeanywhere At command line:
wget -O- https://toolbelt. heroku.com/install-ubuntu.sh | sh
At command line:
heroku login
Ensure git is used in the directory
git status
If directory not in git repository
git init
git status
Add files or sub-directory to git
git add app.js
git add views/
Commit add
git commit -m "[message here]"
Create URL for your app and add git remote heroku
heroku create
git remote -v
Create a start-up script:
"start": "node app.js"
Add and Commit package.json to git
git add package.json
git commit -m "add start script"
Push codes in git master branch over to Heroku
git push heroku master
heroku help
heroku logs
heroku open