npm i cookie-parser

main.ts

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import * as cookieParser from 'cookie-parser'

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(cookieParser());
  await app.listen(5000);
}
bootstrap();
  @Get('json')
  json(@Request() req){
    l(req.cookies)
  }

相关文章:

  • 2021-11-07
  • 2021-12-10
  • 2021-11-19
  • 2021-11-30
  • 2021-12-19
  • 2021-12-19
  • 2021-11-30
  • 2021-08-17
猜你喜欢
  • 2021-08-01
  • 2021-11-30
  • 2021-12-04
  • 2021-12-18
  • 2021-08-01
  • 2021-11-30
  • 2021-12-19
  • 2021-08-13
相关资源
相似解决方案