Skip to content

JohanCarrillo/BLOG-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLOG-API

About the project

asdasd

Setting up the database

This project uses Prisma ORM to manage the database and PostgreSQL as database engine.

After installing the package with npm you have to initialize Prisma with the command

npx prisma init

Configure Prisma Client

In order to perform any database operation you to generate the Prisma Client, since the schema.prisma file is ready-to-use you just have to run the command

npx prisma generate

And then, import and instantiate the Client in whatever service you need it. Like this

import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

Use the Prisma Client to perform any database operation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors