Prisma Setup

Learn about the Prisma Node.js library and how to install it on your local machine via the CLI.

We'll cover the following...

We’ll walk through five basic steps in setting up a Prisma back-end server.

Note: Please ensure Git BASH, Yarn, Docker, and Node are installed.

Create an empty npm directory

We can easily create an empty folder or directory from the command line (or Git Bash on Microsoft Windows).

mkdir educative-prisma && cd educative-prisma

Next, initiate npm using the -y flag.

npm init -y

This should create a package.json file at the root directory.

Initialize git

For this step, we initialize git for our repo with the following command:

git init

Setup a TypeScript Express project

  • Install TypeScript dependencies using the following command:
yarn add typescript ts-node @types/node express @types/express
  • Create a tsconfig.json file using the following command:
touch tsconfig.json

This will create an empty tsconfig.json file. Add the below code:

{
"compilerOptions": {
"strict": true,
"sourceMap": true,
"outDir": "dist",
"esModuleInterop": true,
"lib": ["esnext"]
}
}

Install the Prisma CLI

Working ...