Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
nestjs-prisma
Advanced tools
Add Prisma support to your NestJS application.
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.
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 | Description | Type | Default |
---|---|---|---|
addDocker | Create a Dockerfile and docker-compose.yaml. | boolean | false |
dockerNodeImageVersion | Node version for the builder and runner image. | string | 12 |
prismaVersion | The Prisma version to be installed. | string | 2.4.0 |
skipInstall | Skip installing dependency packages. | boolean | false |
skipPrismaInit | Skip initializing Prisma. | boolean | false |
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 article about Custom Angular Schematics which also applies to Nest.
FAQs
Library and schematics to add Prisma integration to a NestJS application
We found that nestjs-prisma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.