Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/robertoachar/playground-koa-mongodb
- Owner: robertoachar
- License: mit
- Created: 2019-04-23T19:09:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T01:54:04.000Z (over 5 years ago)
- Last Synced: 2024-11-13T21:15:03.939Z (about 2 months ago)
- Topics: crud, koa, koa-bodyparser, koa-helmet, koa-router, mongodb, node, playground
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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