Skip to content

CatsMiaow/nestjs-project-performance

Repository files navigation

nestjs-project-performance

Node.js framework NestJS project for performance

If you focus on the performance or features of the module, you can consider using another module as an alternative in NestJS.
In this example, the changed modules are as follows.

Configuration

  1. Create a .env file
  2. Edit the schema.prisma file.

Installation

# 1. node_modules
npm ci
# 2-1. Generate schema from existing database
npx prisma db pull
# Convert snake_case to PascalCase, camelCase in the generated schema
npx @paljs/cli schema camel-case
# 2-2. Write a model and generate it in the database (one of the following)
npx prisma db push
npx prisma migrate dev
# 3. Apply schema model to @prisma/client
npx prisma generate

Development

npm run start:dev

Run http://localhost:3000

Test

npm test # exclude e2e
npm run test:e2e # only e2e

Production

# define NODE_ENV and PORT
npm run build
# NODE_ENV=production PORT=8000 node dist/app
node dist/app
# OR
npm start

Implements

Links