Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nestjs-prisma

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-prisma

Schematics to add Prisma support to a NestJS application

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NestJS Prisma Schematics

Add Prisma support to your NestJS application.

Installation

nest add nestjs-prisma

# initialize prisma
npx prisma init

Example output

▹▹▹▹▸ Package installation in progress... ☕
CREATE src/prisma/prisma.service.spec.ts (460 bytes)
CREATE src/prisma/prisma.service.ts (387 bytes)
UPDATE package.json (1108 bytes)
✔ Packages installed successfully.

Additional options

You can pass additional flags to customize the schematic. For example, if you want to install a different version for Prisma use --prismaVersion flag:

nest add nestjs-prisma --prismaVersion 2.2.0

If you want to skip installing dependencies use --skipInstall flag:

nest add nestjs-prisma --skipInstall

Add Dockerfile and docker-compose.yaml, you can even use a different node version (12-alpine or 14).

Currently uses to PostgreSQL as a default database in docker-compose.yaml.

nest add nestjs-prisma --addDocker --dockerNodeImageVersion 12-alpine

All available flags:

Flag DescriptionType Default
 addDockerCreate a Dockerfile and docker-compose.yaml.boolean false
 dockerNodeImageVersionNode version for the builder and runner image.string12
 prismaVersionThe Prisma version to be installed.string2.4.0
 skipInstallSkip installing dependency packages.booleanfalse
 skipPrismaInitSkip initializing Prisma.booleanfalse

Developing

Install @angular-devkit/schematics-cli to be able to use schematics command

npm i -g @angular-devkit/schematics-cli

Now build the schematics and run the schematic.

npm run build
# or
npm run build:watch

# dry-run
schematics .:nest-add

# execute schematics
schematics .:nest-add --debug false
# or
schematics .:nest-add --dry-run false

Helpful

Helpful article about Custom Angular Schematics which also applies to Nest.

Keywords

FAQs

Package last updated on 06 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc