/nestjs-blog

Blog built with NestJS and Prisma

Primary LanguageTypeScript

Description

Blog backend built with NestJS and Prisma.

A walkthrough for this project is available at WALKTHROUGH.md.

Installation

# Install Yarn
$ npm install -g yarn

# Install dependencies
$ yarn install

# Add .env file with DATABASE_URL and run migrations
$ yarn prisma migrate dev

# Enable pre-commit hook with Husky
$ npx husky install && npx husky add .husky/pre-commit "yarn lint-staged"

# JWT_KEY will also have to be set in .env for authentication

Running the app

# Development
$ yarn start

# Watch mode
$ yarn start:dev

# Open Prisma Studio to explore and manipulate your data
$ yarn prisma studio

# Go to http://localhost:3000/api to view and interact with the API

Test

# Run tests
$ yarn test

# Test coverage
$ yarn test:cov

Resources used