A simple service to retrieve records from a DB with filters
Heroku url: http://records-service-cristianpq.herokuapp.com
npm
node
>= 14.17.0 (will likely work with older versions, but has never been tested)
npm install
npm start
will start the application at
http://localhost:8080 (set environment variable PORT
to change the port).
curl --data '{
"startDate": "2016-01-26", "endDate": "2018-02-02", "minCount": 2800, "maxCount": 3000
}' -H "Content-Type: application/json" http://records-service-cristianpq.herokuapp.com/records
Tests can be run with npm test
.
All tests are colocated with their respective source files in *.spec.js
files,
using Jest with default settings.
- Configure Node API basic config to interact with it as an RestFul API
- Configure model for Record with Mongoose
- Configure MongoDB connection with environment variables
- Create unit test for controller to ensure that the error controll is working fine
- Create service and controller
- Check that the test works fine, improve project configuration for logging and debugging capabilities
- Write documentation
- Deploy yo heroku