Angular Express boilerplate to start a Bootstrap only website without AngularJS.
Features:
- automatic compilation of ES6 with Babel
- pre-configured package management using jspm
- dynamic module loading using the SystemJS dynamic ES6 loader
- pre-configured unit testing with karma, mocha, chai and PhantomJS
- powerful built-in server based on Express 4 and Harp with preprocessor support for Jade, Markdown, EJS, Coffeescript, Sass, LESS and Stylus.
- compile to HTML, CSS & JavaScript and host it anywhere
- customizable Bootstrap CSS framework
Ensure the Angular Express CLI tool is installed:
$ npm install -g ngx-cli
Create a new project directory:
$ mkdir project
$ cd project
Initialize the boilerplate:
$ ngx init -b bootstrap-only
Install third-party dependencies:
$ jspm install
$ npm install
Finally start the Angular Express server:
$ npm start
and navigate to: <ip>:9000
in the browser.
The configuration is stored in configuration files in the /config
directory.
It can be overriden and extended using the node-config rules:
# Default configuration
/config/default.js
# Production configuration
/config/production.js
# Local configuration
/config/local.js
See configuration files for more information.
Start the server:
# Uses NODE_ENV of your environment
$ npm start
Start the server in development mode:
# Uses NODE_ENV=development
$ npm run development-server
Start the server in production mode:
# Update src/build.js
$ npm run build
# Start production server
# Uses NODE_ENV=production
$ npm run production-server
From the root of the project, run:
$ npm run compile
to compile static HTML, CSS and JavaScript in dist
.
Ensure you have BrowserSync installed:
$ npm install -g browser-sync
From the root of the project, run:
$ browser-sync start --proxy localhost:9000 --files "src/**/*"
and navigate your browser to the BrowserSync url:
--------------------------------------
Local: http://localhost:3000
--------------------------------------
UI: http://localhost:3001
--------------------------------------
Make sure the Karma CLI is installed:
$ npm install -g karma-cli
To run the tests:
$ karma start
- Initial version