A basic AngularJS app using Express 4. It demonstrates the basic of looping through an array of data using 'ng-repeat'. It also has like and dislike buttons using 'ng-click'. It is based upon the AngularJS lesson found at codecademy.
The app is ready to deploy to Heroku. The Procfile, .env and server.js files have already been created, therefore only the following is required to get it deployed to Heroku:
Further details about the steps in deploying the app can be found at the following articles:
It is assumed that you have the following installed:
- Node.js and npm installed.
- an existing Node.js app.
- a free Heroku account.
- the Heroku CLI and Heroku Toolbelt.
Fork the repo and the make a clone of the forked repo in your local machine.
First check if you aren't relying in system-level packages. You shouldn't get errors.
$ cd angular-basic-array
$ rm -rf node_modules; npm install --production
$ heroku local web
Your app should now be running on localhost:5000.
If there is an error due a module not been found, it should show what dependency is missing from your package.json file.
$ cd angular-basic-array
$ npm install
$ heroku local web
Your app should now be running on localhost:5000.
You can also try out the npm server
$ cd angular-basic-array
$ npm start
Your app should now be running on localhost:5000.
$ heroku create
$ git push heroku master
$ heroku open
For more information about using Node.js on Heroku, see these Dev Center articles: