Nest.js 集成 
如果您当前有一个nest.js项目,您可以很方便从nest.js迁移到unioc。
WARNING
目前,unioc的nest.js适配器还处于实验阶段,仅支持基础的Restful API支持,我们将在接下来的时间里继续完善其他功能。
安装 
bash
pnpm i unioc使用 
更改您的启动器代码为如下:
ts
import process from 'node:process'
import { NestJS } from 'unioc/adapter-nestjs'
import { ExpressApp } from 'unioc/web-express'
import { AppModule } from './app.module'
async function bootstrap() {
  // 创建一个 Express 应用
  const app = await new ExpressApp()
  // 使用 NestJS 适配器,并导入您的程序主模块
  app.use(NestJS, {
    imports: [AppModule],
  } satisfies NestJS.Options)
  // 运行这个应用
  await app.run(process.env.PORT || 3616)
}
bootstrap()目前,nest.js还没有适配@nestjs/swagger等这类直接通过修改bootstrap来适配的插件,后续将会有规划出一个统一的swagger插件。
 Zero
 Zero