A progressive Node.js framework for building efficient and scalable server-side applications.
cookieのJWT認証とCSRF対策
sequenceDiagram
autonumber
Client->>+Server: GET /auth/csrf
Server-->>-Client: set-cookie: Secret, httpOnly cookie
Client->>+Server: POST /auth/login
Server-->>-Client: set-cookie: JWT httpOnly cookie
Client->>+Server: Post /task
Note right of Client: cookie: JWT<br>httpOnly cookie<br>cookie: Secret<br>httpOnly cookie<br>header: Csrf Token
Nest framework TypeScript starter repository.
- prisma の schema を変更した場合
npx prisma migrate dev
- prisma の studio を立ち上げる
npx prisma studio
- 型の再生成
npx prisma generate
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
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.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.