Nest framework TypeScript starter repository.
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
To set up the database with Docker and migration, run the following command:
docker-compose up
yarn prisma:migrate:dev
yarn seed // sample data
erDiagram
User {
int id
string username
string name
string password
datetime createdAt
datetime updatedAt
}
Post {
int id
string title
string content
PostCommunity community
int authorId
datetime createdAt
datetime updatedAt
}
Comment {
int id
string content
int postId
int authorId
datetime createdAt
datetime updatedAt
}
User ||--o{ Post : "posts"
Comment }o--|| User : "author"
Comment }o--|| Post : "post"
- User authentication including regis and login.
- Post (create, update, remove, findById, findAll) requiring JWT token.
- Comment (create, update, delete) requiring JWT token.
your can view swagger /api
Nest is MIT licensed.