Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/robertoachar/playground-koa-mongodb

A playground for Koa with MongoDB.
https://github.com/robertoachar/playground-koa-mongodb

crud koa koa-bodyparser koa-helmet koa-router mongodb node playground

Last synced: 6 days ago
JSON representation

A playground for Koa with MongoDB.

Awesome Lists containing this project

README

        

# playground-koa-mongodb

Generated by [Node Project Generator](https://github.com/robertoachar/generator-node).

[![License][license-badge]][license-url]

> A playground for Koa with MongoDB.

## Development

- Clone the repo

```bash
$ git clone https://github.com/robertoachar/playground-koa-mongodb.git
```

- Install dependencies

```bash
$ npm install
```

- Run scripts

| Action | Usage |
| ---------------------- | -------------- |
| Start development mode | `npm start` |
| Lint code | `npm run lint` |

## Environment

```yaml
# .env file
NODE_ENV = development
DATABASE = mongodb://localhost/playground-koa-mongodb
PORT = 3000
```

## Endpoints

| 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 |

## Author

[Roberto Achar](https://twitter.com/robertoachar)

## License

[MIT](https://github.com/robertoachar/playground-koa-mongodb/blob/master/LICENSE)

[license-badge]: https://img.shields.io/github/license/robertoachar/playground-koa-mongodb.svg
[license-url]: https://opensource.org/licenses/MIT