CodeGenieApp / CodeGenieApp/serverless-express
NestJS example does not work with root paths
- Lingua principale
- JavaScript
- Stelle
- 5.3k
- Fork
- 676
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The [starter example for Nest JS](https://github.com/vendia/serverless-express/tree/mainline/examples/basic-starter-nestjs) does not work with root paths.
## Steps to reproduce
```shell
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](https://github.com/vendia/serverless-express/blob/mainline/examples/basic-starter-nestjs/src/app.controller.ts#L8) so it [defaults to the root path for the controller](https://docs.nestjs.com/controllers#routing).
```shell
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:
```shell
nest new nest-test
cd nest-test
npm run start
```
Make a request to `http://localhost:3000`.
The server responds with the expected response.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.