This example is meant to show component style architecture in a functional Angular 1.X application.
- Uses Typescript via Typescript Loader
- ES6 and ES7 support with babel.js
- All the lovely features from the workflow I forked to create this:
https://github.com/Foxandxss/angular-webpack-workflow - No gulp and no grunt, just npm run-scripts
- Runs on a Node Express backend with MongoDB
To use it, just clone this repo and install the npm dependencies:
$ git clone https://github.com/twomoonsfactory/animal-house-example my_app
$ cd my_app
$ npm installThe server will have been downloaded with the rest of the repo -- but make sure to have installed MongoDB before running it
- Run MongoDB
- In Command Prompt or Terminal, navigate to the repo's
srcfolder, and enternode server.js-- this will start the server and connect the DB - The server will serve up the contents of the
publicfolder, which contains the result of thebuildscript - This listens at
http://localhost:8080
All scripts are run with npm run [script], for example: npm run test
-
build- generate a minified build to dist folder,public -
dev- start development server, try it by openinghttp://localhost:8080/ -
test- run all tests -
test:live- continuously run unit tests watching for changes -
Note, for dev server, api calls to the DB in the service will need to be aimed directly to
http://localhost:8080/or they will not communicate with the server (this is the default)
See what each script does by looking at the scripts section in package.json