Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sdn302/nest-prisma-mongo

NestJs + Prisma + MongoDB
https://github.com/sdn302/nest-prisma-mongo

mongodb nestjs prisma swagger

Last synced: about 1 month ago
JSON representation

NestJs + Prisma + MongoDB

Awesome Lists containing this project

README

        

# SDN302 - Group 1
## Implement the end-to-end solution integrating Nestjs, mongodb, Prisma to build REST API

### Tech Stack


### Setup
- Create Nest Project

```bash
npm i -g @nestjs/cli
```

```bash
nest new project-name
```

- Install prisma

```bash
npm install -g prisma
```

```bash
npx prisma init
```

- Push the initial schema to the database:

```bash
npx prisma db push
```

- Generates files based on a schematic

```bash
nest g [options]
```

| Name | Alias | Description |
|-------------|-------|-------------------------------------------------------------------------------------------------|
| controller | co | Generate a controller declaration. |
| module | mo | Generate a module declaration. |
| service | s | Generate a service declaration. |

### Run:

```bash
npm run start
```