Generated by Node Project Generator.
A playground for Koa with MongoDB.
- Clone the repo
$ git clone https://github.com/robertoachar/playground-koa-mongodb.git- Install dependencies
$ npm install- Run scripts
| Action | Usage |
|---|---|
| Start development mode | npm start |
| Lint code | npm run lint |
# .env file
NODE_ENV = development
DATABASE = mongodb://localhost/playground-koa-mongodb
PORT = 3000| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users |
Get a list of users |
| POST | /api/users |
Create a new user |
| GET | /api/users/:id |
Get a user by id |
| PUT | /api/users/:id |
Update a user |
| DELETE | /api/users/:id |
Delete a user |