Skip to content

MileTwo/nestjs-gql-prisma

Repository files navigation

NestJS TypeScript, Prisma, Apollo Server GraphQL project

All Contributors

Includes NestJS TypeScript, Prisma, Apollo Server GraphQL project

Installation

$ npm install

Running the app

The GraphQL playground can be accessed at localhost:3000/graphql.

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Next steps:

  1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
  2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver (Preview) or mongodb (Preview).
  3. Run npx prisma db pull to turn your database schema into a Prisma schema.
  4. Run npx prisma generate to generate the Prisma Client. You can then start querying your database.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Steve Gentile

💻

John Fay

📖

This project follows the all-contributors specification. Contributions of any kind welcome!