Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/desmondhiew00/nestjs-monorepo

Simple nestjs backend starter with graphql.
https://github.com/desmondhiew00/nestjs-monorepo

nestjs nestjs-graphql nestjs-monorepo prisma

Last synced: about 2 months ago
JSON representation

Simple nestjs backend starter with graphql.

Awesome Lists containing this project

README

        


Nest Logo

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

A progressive Node.js framework for building efficient and scalable server-side applications.



NPM Version
Package License
NPM Downloads
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective
Donate us
Support us
Follow us on Twitter


## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Project setup

```bash
$ pnpm install
```

## Compile and run the project

```bash
# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod
```

## Run tests

```bash
# unit tests
$ pnpm run test

# e2e tests
$ pnpm run test:e2e

# test coverage
$ pnpm run test:cov
```

## Scripts

| Command | Description |
| --------------------------- | --------------------------------------------- |
| `prisma:generate` | Generate the Prisma client and graphql schema |
| `prisma:migration:gen` | Generate a new migration |
| `prisma:migration:run` | Run the migration |
| `prisma:seed` | Seed the database with data |
| `codegen:crud-module` | Generate a new CRUD module |

## Database Dev Flow

1. Define database schema in `prisma/schema` folder
2. Generate Prisma client and graphql schema with `pnpm prisma:generate`
3. Generate a new migration with `pnpm prisma:migration:gen`
4. Run the migration with `pnpm prisma:migration:run`
5. Seed the database with data with `pnpm prisma:seed`

### Migration Failed
1. `prisma migrate resolve --rolled-back ""`
2. Run migration again

### Fix "The migration `migration-name` was modified after it was applied."
1. shasum -a 256 prisma/migrations/<0000000_my_migration>/migration.sql
2. update the `checksum` column value in database
3. update _prisma_migrations set checksum = "<>" where migration_name = "<>"

## Resources

Check out a few resources that may come in handy when working with NestJS:

- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).