Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 566 Bytes

File metadata and controls

38 lines (26 loc) · 566 Bytes

Prisma Typescript Example1

Description

This is a simple example of how to use Prisma with Typescript, using the Prisma Client, the project includes a simple CRUD of Authors and Books.

How to use

Install

npm install

Run

npm run dev

Check .env file

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/prisma-ts?schema=public"

Check Prisma schema

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}