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

Sequence

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
Loading

Description

Nest framework TypeScript starter repository.

  • prisma の schema を変更した場合
npx prisma migrate dev
  • prisma の studio を立ち上げる
npx prisma studio

--> http://localhost:5555

  • 型の再生成
npx prisma generate

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

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.

Stay in touch

License

Nest is MIT licensed.