Skip to content
i_learnin edited this page May 22, 2013 · 3 revisions

1. Getting started

Running this application requires a one-time setup of the MySQL database.

mysql> create database gajumaru_portal_dev default character set utf8;
mysql> create user 'gajumarudev'@'localhost' identified by 'gajumarudev';
mysql> grant all privileges on gajumaru_portal_dev.* to 'gajumarudev'@'localhost';
mysql> flush privileges;

Requires to install dependencies.

$ npm install -g db-migrate
$ npm install -g mysql
$ npm install

Execute the following commands to setup the database tables and seeds.

$ db-migrate up -m db/migrations --config config/database.json -e development
$ NODE_PATH=lib node db/seeds.js

Now, execute the following command to run this application.

$ npm start

2. Running the tests

Running the tests requires to install dependencies.

$ npm install -g mocha
$ npm install -g db-migrate
$ npm install -g sqlite3
$ npm install

Execute the following command to setup the database tables.

$ db-migrate up -m db/migrations --config config/database.json -e test

Now, execute the following command to run the tests.

$ npm test
Clone this wiki locally