https://github.com/mabc224/javascript-nestjs-mongodb-rest-api
Rest api using JavaScript in Nest.js with mongodb (mongoose) and Open api
https://github.com/mabc224/javascript-nestjs-mongodb-rest-api
javascript mongodb mongoose nestjs nestjs-mongoose nodejs rest-api
Last synced: 3 months ago
JSON representation
Rest api using JavaScript in Nest.js with mongodb (mongoose) and Open api
- Host: GitHub
- URL: https://github.com/mabc224/javascript-nestjs-mongodb-rest-api
- Owner: mabc224
- Created: 2021-12-18T14:45:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T01:46:18.000Z (over 4 years ago)
- Last Synced: 2025-12-27T15:12:14.904Z (6 months ago)
- Topics: javascript, mongodb, mongoose, nestjs, nestjs-mongoose, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Restaurant Rest API
Sample Rest api of restaurant written in Javascript using Nestjs & mongoose
## Configuration
See `.env_example` file for configuration
## Installation
```bash
$ npm install
```
## Running the app
```bash
create `.env` file in root and copy content from `.env_example` and configure values.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
```
## Test
```bash
# tests
$ npm test
```
## API Documentation
Import open api docs into postman as collection.
```shell
docs/restaurant-api-v0.1.yaml
```
#### Directory Structure
```shell
├── docs
| ├── README.md
| └── restaurant-api-v0.1.yaml
├── index.js
├── nest-cli.json
├── nodemon.json
├── package-lock.json
├── package.json
├── README.md
└── src
├── controllers
| ├── index.js
| ├── restaurant-menu.controller.js
| ├── restaurant-munu.controller.spec.js
| ├── restaurant.controller.js
| └── restaurant.controller.spec.js
├── filters
| └── exception.filter.js
├── gateway.module.js
├── main.js
├── middlewares
| ├── index.js
| └── logger.middleware.js
├── modules
| ├── database.module.js
| └── index.js
├── schemas
| ├── index.js
| ├── restaurant-menu.schema.js
| └── restaurant.schema.js
└── services
├── index.js
├── restaurant-menu.service.js
├── restaurant-menu.service.spec.js
├── restaurant.service.js
└── restaurant.service.spec.js
```
## Tech Stack
- Node.js
- Nest.js (Javascript)
- Mongoose (MongoDb)
- Winston (Logging)
### Next Steps
- [ ] Add validation for input
- [ ] Add Auth guards using JWT
- [ ] Make docs downloadable
- [ ] Add tests