Skip to content

bdavisx/angular-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Development Process

The default grunt task checks the javascript, runs the unit tests and builds (non-minified) distributable files.

  • Build (will run tests): grunt (or grunt.cmd on Windows).
  • Open one or more browsers and point them to http://localhost:8080. Once the browsers connect the tests will run and the build will complete.
  • If you leave the browsers open at this url then future runs of grunt will automatically run the tests against these browsers.

Building only

You can run the development build on its own without tests to simply concatenate all the files to the dist folder

  • Run grunt build

Building release code

You can build a release version of the app, with minified files.

  • Run grunt release

Continuous testing

You can have grunt (testacular) continuously watch for file changes and automatically run all the tests on every change.

  • Run grunt test-watch
  • Open one or more browsers and point them to http://localhost:8080.
  • Each time a file changes the tests will be run against each browser.

Folders

  • build contains build tasks for Grunt
  • lib contains external dependencies (both for the application and tests)
  • dist contains build results
  • src contains application's sources
  • test contains test sources

Running from the local server

  • Install local dependencies for the server:
    • cd server
    • npm install
  • Run the server with node server.js
  • Browse to the application at http://localhost:3000

Proxying the db through the local server

  • Change the MONGO_CONFIG.baseUrl value in the app module (src/modules/app/app.js) from baseUrl: 'https://api.mongolab.com/api/1/databases/', to baseUrl: 'http://localhost:3000/databases/',
  • Run the server (see above)
  • Browse to the application at http://localhost:3000
  • Now all database calls get proxied through the backend server. This will allow us to implement access control.

About

Reference application for AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published