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

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

A playground for Express and MongoDB.
https://github.com/robertoachar/playground-express-mongodb

express mongodb node playground

Last synced: 2 months ago
JSON representation

A playground for Express and MongoDB.

Awesome Lists containing this project

README

        

# playground-express-mongodb

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

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

> A playground for Express and MongoDB.

# Development

* Cloning the repo

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

* Installing dependencies

```bash
$ npm install
```

* Running scripts

| Action | Usage |
| ------------------------- | -------------- |
| Starting development mode | `npm start` |
| Linting code | `npm run lint` |

* Environment variables

Create a `.env` file in the root directory.

```yml
NODE_ENV=development
DATABASE=mongodb://localhost:27017/playground
PORT=3000
```

# User Endpoint

Endpoint for managing users.

| Method | Endpoint | Description |
| ------ | ---------- | ------------------------- |
| GET | /users | Retrieves a list of users |
| GET | /users/:id | Retrieves a specific user |
| POST | /users | Creates a new user |
| PUT | /users/:id | Updates user |
| DELETE | /users/:id | Deletes user |

# Author

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

# License

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

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