Running the application
- Install dependencies
In the application source directory.
Run npm install -g grunt-cli
Run npm install -g node-windows
Run npm install -g bower
Run npm install
in order to install all node dependencies
Run bower install
in order to install all client dependencies
- Run the application as standalone
Run node server
1.a) Initialize the application database (required the for the first run)
Run node server --initdb
- Run under grunt
Run grunt serve
- Install as a Windows service
Requires that node-windows is installed (https://github.com/coreybutler/node-windows)
Run node service --install
(The service will be installed as TTKD SMA)
3.a) Other options
--stop
Stop the service
--remove
Uninstall the Windows service
--start
Start the Windows service if stopped
A) Command line options
--initdb
Initialize the application database. Must be run the first time the application is run.
--firstrun
Will initialize the application database if the application has never been run.
--init-users
Will only reset/load the users collection
--init-assets
Will only reset/load the routes collection. Must be run if a new route has been added to the system
--stop
Stop the application. Processed last. Used with other other command line options.
B) Tips
In order to add a new route. If you are getting an Permission For Route Not Found Error
-
Register the route in the routeData.js file
-
Add the route the the server/data/assets.js file and specify the permissions
C) Configuration File
The application configuration file can be found at "server/configuration/config.json"
- port
specify an application port other than 9000
- db
Configure the mongodb connection
- test
Configure the mongodb test db connection
- security
Configure the session security information