Skip to content

gurunate/users-service

Repository files navigation

users-service

Simple RESTful users service built with restify, Sequelize, MySQL and Docker.

Setup

Install

$ npm i

Configuration

See sample.env for required environment variables.

For a quick start, copy the sample.env to .env.

$ cp sample.env .env

Database

user-service requires a running MySQL.

Build DB

$ npm run db:build

Run DB

$ npm run db:run

View DB Logs

$ npm run db:logs

Stop DB

$ npm run db:stop

Start

$ npm start

Development

$ npm run dev

Usage

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

References

Related Resouces

External Links