Skip to content

haqi111/OrganizationManagementSystem

Repository files navigation

Basics

NestJS app with Express, Prisma and nestjs-prisma.

Adjust prisma/schema.prisma and perform a migration:

npx prisma migrate dev

Seed the example database:

npx prisma db seed

Start the Nest app and open localhost:3000.

npm i

npm run start:dev

Use PrismaService to access the type-safe generated PrismaClient.

import { Injectable } from '@nestjs/common';
import { PrismaService } from 'nestjs-prisma';

@Injectable()
export class AppService {
  constructor(private prisma: PrismaService) {}

  users() {
    return this.prisma.user.findMany();
  }

  user(userId: string) {
    return this.prisma.user.findUnique({
      where: { id: userId },
    });
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages