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-12-05
  • 2022-01-17
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-28
  • 2022-01-24
  • 2022-12-23
  • 2021-11-30
  • 2021-08-01
  • 2022-03-01
  • 2021-12-26
相关资源
相似解决方案