Informatics reporting and analysis web site.
The "glue code" libraries being used:
- Node JS for HTTP serving and server JS moduling.
- Node Package Manager for server JS package managing.
- Git for source controlling.
- Express JS for javascript web application structuring.
- Jade for server side templating.
- Angular JS for client side MVCing.
- Bootstrap for client side web developing.
- Grunt for server and client JS building and tasking.
- Bower for web package managing.
- Mocha for JS unit testing.
- Chai for unit test asserting.
- MongoDB for data storing.
- MongGoose for validation, casting and business logic boilerplating.
-
Install Git.
-
Clone the
biodome
repository:git clone [email protected]:jumpjet71/biodome.git
From the biodome
project directory , run the following from the command line:
-
Install Grunt CLI and the Bower CLI global dependencies:
npm install grunt-cli bower -g
-
Install all of the local client side JavaScript dependencies:
bower install
-
Install all of the local server side JavaScript dependencies:
npm install
There are a number of Grunt based targets that are used for running different build tasks:
grunt build-debug
orgrunt
: To run tests locally and compile all of the CSS and JavaScript files into/dist
.grunt build
: To run tests locally ,compile and UglifyJS the CSS and JavaScript into/dist
.grunt test
: Run all server js and all client JavaScript Mocha unit tests headless in PhantomJS.grunt watch
: This is a developer convenience method for watching JavaScript and CSS file and automatically building them whenever you save.
NOTE: MongoDB needs to be installed and running in order to run test tasks.
There are three environments provided by default, development
, test
, and production
.
Each of these environments has the following configuration options:
mongoDbUrl
: This is the url of the MongoDB database to use, and is set by default set tomongodb://localhost/biodome-test
for the test environment.app.name
: This is the name of your app or website, and can be different for each environment. You can tell which environment you are running by looking at the TITLE attribute that your app generates.
To run with a different environment, just specify NODE_ENV
as you call grunt:
$ NODE_ENV=test grunt
If you are using node directly instead of grunt, it is very similar:
$ NODE_ENV=test node server
After successfully running grunt
, grunt build-debug
, or grunt test
you are ready to run the application.
The following commands set NODE_ENV
with the appropriate environment, Nodemon for server side code monitoring.
grunt run-test-mode
: To run the application with test environment. (The running application URL will be: http://localhost:3000)grunt run-dev-mode
: To run the application with development environment. (The running application URL will be: http://localhost:3000)
NOTE: MongoDB needs to be installed and running in order to run project.