Prototype build based on https://github.com/diegohaz/rest
Database: MySQL
ORM - http://docs.sequelizejs.com/
- git clone https://github.com/tchai81/demo-api.git
- Navigate to the folder
$ cd <folder-name>
- Installing dependencies
$ npm install
- Replicating .env from .env.example
$ cp .env.example .env
- Create a MySQL database on your local and state down all details
- Make necessary changes to .env
- Execute database migration by navigating to \src
$ ../node_modules/.bin/sequelize db:migrate
- To restore database to a clean state
$ ../node_modules/.bin/sequelize db:migrate:undo:all
- Start the server
$ npm run prod
- For {"key" : "value"} pair, "value" only accepts String
- For getting a value for a key with timestamp, if timestamp is earlier than creation date, null will be returned
- Unit test is incomplete
- While testing on live url, you may encountering server not responding error. Please bear with this as this application is hosted on a free tier service.