- Check that you have node.js installed.
$ node -v - If you don't have node.js, go here and install node.js.
- Install n.
$ npm install -g n. - Install the latest node.js that's higher than 0.11.13.
$ sudo n latest - Install koa.js
$ npm install koa - Install gulp globally
$ sudo npm install --global gulp - Install mocha globally
$ sudo npm install --global mocha
$ gulp server
$ node --harmony server.js
The server runs on port 5000, so go to http://localhost:5000/v0.
$ npm test
In another terminal, run
$ mongod
Make sure this runs.
Jake is what rake is to the nodejs world.
Write tasks like dropping database and populating database in jakelib folder.
To dropping database
$ jake db:drop
To seed database with 100 fake users
$ jake db:seed
More on jake.
To get this cool thing,
$ brew install tree
$ tree -I node_modules
.
├── Procfile
├── README.md
├── gulpfile.js
├── index.js
├── jakelib
│ └── database.jake
├── lib
│ ├── config
│ │ ├── application.js
│ │ └── config.js
│ └── db
│ └── mongo.js
├── package.json
└── test
├── lib
│ ├── config
│ │ └── config.js
│ └── server.js
└── test.conf.js