Skip to content

Migrating from NestJS

Shokupan supports NestJS-style decorators with a lighter-weight approach.

NestJS:

@Controller('users')
export class UserController {
@Get(':id')
getUser(@Param('id') id: string) {
return { id };
}
}

Shokupan:

export class UserController {
@Get('/:id')
getUser(@Param('id') id: string) {
return { id };
}
}
app.mount('/users', UserController);