serverless-express
serverless-express copied to clipboard
NestJS example does not work with root paths
The starter example for Nest JS does not work with root paths.
Steps to reproduce
git clone https://github.com/vendia/serverless-express.git
cd serverless-express/examples/basic-starter-nestjs
npm ci
Remove the path from the demo controller's handler so it defaults to the root path for the controller.
npm run sls:offline
Make a request to http://localhost:3000/dev
.
The server responds with a 404
error of Cannot GET null
.
I have confirmed that this does not occur when using Nest JS without Serverless:
nest new nest-test
cd nest-test
npm run start
Make a request to http://localhost:3000
.
The server responds with the expected response.
Same issue. Not sure if I have missed something. Any idea how or when this is going to be fixed?
Having the same problem. Any ideas? I've followed the docs https://docs.nestjs.com/faq/serverless step by step. Except that I've left main.ts
as it was a used lambda.ts
instead.
Edit: For me it appears to work on aws, but not when using serverless offline
, so might be a simulator issue only?