Skip to content

MoeeinAali-Teachings/Prisma-Postgresql

Repository files navigation

Getting Started

Using Docker

  1. Clone the repository:
git clone https://github.com/MoeeinAali-Teachings/Prisma-Postgresql.git
cd prisma-postgresql
  1. Create a .env file in the root directory:
DATABASE_URL="postgresql://postgres:postgres@db:5432/department_db"
PORT="3000"
  1. Start the application using Docker Compose:
sudo docker-compose up --build -d

The API will be available at http://localhost:3000

Running Locally

  1. Install dependencies:
npm install
  1. Create a .env file with your database connection string:
DATABASE_URL="postgresql://username:password@localhost:5432/department_db"
PORT="3000"
  1. Run database migrations:
npx prisma migrate dev
  1. Start the development server:
npm run dev

Development

To make changes to the database schema:

  1. Modify the schema in prisma/schema.prisma
  2. Generate a new migration:
npx prisma migrate dev --name <migration-name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors