Simple RESTful users service built with restify, Sequelize, MySQL and Docker.
$ npm i
See sample.env for required environment variables.
For a quick start, copy the sample.env
to .env
.
$ cp sample.env .env
user-service
requires a running MySQL.
$ npm run db:build
$ npm run db:run
$ npm run db:logs
$ npm run db:stop
$ npm start
$ npm run dev
Method | Path | Description |
---|---|---|
GET |
/users |
Returns a list of users |
GET |
/users/:id |
Returns a an existing user |
PUT |
/users |
Creates a new user |
POST |
/users/:id |
Update an existing user |
DELETE |
/users/:id |
Deletes an existing user |