- Install node.js (requires node.js version >= 0.8.4)
- Install global npm modules:
npm install -g [email protected] [email protected]
- Install local dependencies:
npm install
The default grunt task checks the javascript, runs the unit tests and builds (non-minified) distributable files.
- Build (will run tests):
grunt
(orgrunt.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.
You can run the development build on its own without tests to simply concatenate all the files to the dist folder
- Run
grunt build
You can build a release version of the app, with minified files.
- Run
grunt release
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.
build
contains build tasks for Gruntlib
contains external dependencies (both for the application and tests)dist
contains build resultssrc
contains application's sourcestest
contains test sources
- 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
- Change the MONGO_CONFIG.baseUrl value in the app module (src/modules/app/app.js) from
baseUrl: 'https://api.mongolab.com/api/1/databases/',
tobaseUrl: '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.