Skip to content

Nest.js build with Prisma (TypeScript ORM using PostgreSQL)

Notifications You must be signed in to change notification settings

programmerShinobi/auth-prisma-nestjs

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

# the first step
$ yarn install

# create postgreSQL with db name : user_post_auth
$ npx prisma migrate dev

# use data dummy with prisma seed (optional)
$ yarn run seed

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Endpoint

# auth signup
[POST] : http://localhost:3000/v1/auth/signup
Body >>> raw :
{
    "name": "yourName",
    "email": "[email protected]",
    "password": "isPassw0rd!"
}
# auth signin
[POST] : http://localhost:3000/v1/auth/signin
Body >>> raw :
{
    "email": "[email protected]",
    "password": "isPassw0rd!"
}
# auth signout
[GET] : http://localhost:3000/v1/auth/signout
# posts (search: shinobi, page: 1, limit 10)
[GET] : http://localhost:3000/v1/posts?search=Shinobi&page=1&limit=10
# post detail by uuid
[GET] : http://localhost:3000/v1/posts/{:uuid}
# create post
[POST] : http://localhost:3000/v1/posts
Body >>> raw :
{
    "title" : "This Is Title Others",
    "content" : "This is content others"
}
# publish post by uuid
[PUT] : http://localhost:3000/v1/posts/publish/{:uuid}
# delete post by uuid
[DELETE] : http://localhost:3000/v1/posts/{:uuid}

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

License

Nest is MIT licensed.

About

Nest.js build with Prisma (TypeScript ORM using PostgreSQL)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published