This is a simple CRUD API for managing dinosaur data
It is assumed that you have checked out this repo and are in its directory and that your are running Docker Engine v18.06.0
or above. To start:
docker-compose up
This will bring up the API exposed on port 3333 alongside a MongoDB instance. It will set the admin password to letmein
Assuming your running a MongoDB instance accessible on localhost
and you are running Node v8
or above. To start:
ADMIN_PASSWORD=letmein npm start
This will start the server with the admin password set to letmein
The API routes are described by the swagger file: swagger.yaml
POST/PUT/DELETE operations are protected behind Basic HTTP auth. The username is admin
and password letmein
(when running with the above commands)
- Currently any error results in a generic problem error message. Better error messages should be returned and errors inspected to determine server or request fault.
- Logging should be abstracted a bit. Everything talks directly to Winston.
- Tests - unit is not yet called for but light integration would be helpful.