Relational databases
Learn how to create a new Node.js or TypeScript project from scratch by connecting Prisma ORM to your database and generating a Prisma Client for database access. The following tutorial introduces you to the Prisma CLI, Prisma Client, and Prisma Migrate.
Prerequisites
In order to successfully complete this guide, you need:
- Node.js installed on your machine (see system requirements for officially supported versions)
- a CockroachDB database server running
See System requirements for exact version requirements.
Make sure you have your database connection URL at hand. If you don't have a database server running and just want to explore Prisma ORM, check out the Quickstart.
Create project setup
As a first step, create a project directory and navigate into it:
mkdir hello-prisma
cd hello-prisma
Next, initialize a Node.js project and add the Prisma CLI as a development dependency to it:
npm init -y
npm install prisma --save-dev
This creates a package.json
with an initial setup for a Node.js app.