This project is generated with yo angular generator version 0.11.1.
Run grunt
for building and grunt serve
for preview.
Running grunt test
will run the unit tests with karma.
** Any commands listed below with option "-g" are run with ADMIN privileges.
- Install Yeoman.
- npm install -g yo
- Install other dependent packages
- npm install -g grunt-cli bower yo generator-karma generator-angular
- mkdir my-new-project && cd $_
- Create the angular app: yo angular [app-name] (the app name parameter is optional).
- Run the app locally with the following command : grunt serve
- Install more dependent packages:
- npm install gzippo express morgan --save
- Create a server file called web.js in the root director: /web.js
- update web.js with follwoing code:
var gzippo = require('gzippo'); var express = require('express'); var morgan = require('morgan'); var app = express(); app.use(morgan('dev')); app.use(gzippo.staticGzip("" + __dirname + "/dist")); app.listen(process.env.PORT || 5000);
- update web.js with follwoing code:
- Run the following command to build the project: grunt build
- Remove 'dist' from the .gitignore file
- Add a new file : Procfile
- Update "Procfile" with follwoing line:
- web: node web.js
- Create Heroku Account and install Heroku Toolbelt.
- Github instructions:
- git init
- git add .
- git commit -m "Create angular app using Yeoman"
- Heroku instructions:
- Heroku Login
- heroku create <your_app_name>
- Run the following command to push the content to Heroku account,
- git push heroku master
- heroku ps:scale web=1
- heroku open