Starter project for Express, AngularJS, CoffeeScript, LESS, JADE, TwitterBootstrap, Mongoose.
Just my personal project for learning, really.
I am hoping to be able to reuse most of scripts and code from this project for future projects!.
The following terminal commands assumes you are already in the project directory.
Install Mongo database
$ sudo apt-get install mongodb
Install Elastic Search and the head plugin for GUI
$ sudo apt-get install elasticsearch
$ sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head
Open up the browser and see Elastic Search GUI
$ open http://localhost:9200/_plugin/head/
Install all the dependencies
npm install
Change db setting if you wish, you would also need to reflect the same changes to config/default.coffee
$ cd scripts/config
Initialize mongo db with predefined data
$ cd ../
$ ./setupMongodb.coffee
And you are good to go.
$ coffee app.coffee
or
$ node app.js
Kicks off end to end tests with karma
$ ./e2e-test.sh
Kicks off unit tests with karma
$ ./test.sh
The script uses node-config package to read the configs based env.
By default, the script will read default.coffee for properties.
Please refer to https://github.com/lorenwest/node-config if you wish to set config for different envs.
setupMongodb.coffee read config/default.coffee and creates the db with the given name @ given host.
It will create the user with the given password.
After that, it will create and load collections defined in the config from data/ directory.
$ coffee setupMongodb.coffee
loadModelData.coffee is used to load individual collection
$ coffee loadModelData.coffee <modelName> [dataFilename]
Clean up useless files and compile .coffee -> .js, .less -> .css, .jade -> .html
$ make
Compile for production ( does not work yet )
$ make production
Clean up
$ make clean
You can also run make coffee, make jade, make less to compile these extensions individually