This is a demo application of a REST server using restify as HTTP server and sequelize as ORM. This application uses mysql as database therefore you need to have a mysql instance accessible from the machine running the server.
The default configuration redirects all the console.log to the logs, edit the replaceConsole flag in the configuration file to change this setting.
To run the test suite, use npm test
command. Please note that the test suite wipes out the database table before each
run. It's a good idea not to use the same database as development/production.
The test suite uses an independent configuration file located at ./main/config/test.json
- Run
npm install
from the root directory - Create a mysql database using the script provided in ./sql/db.sql
- Configure the database section in
./main/config/development.json
- Run
npm start
to start the server. - By default the API endpoints will be available at http://localhost:3000/v1/promotions
- You can import
./test/postman_shortcuts.json
into your Postman Chrome app to start playing with the server