I created a project serverless and I am having a trouble:
sls create --template aws-nodejs-typescript
npm install serverless-offline --save-dev
then, inside the file serverless.ts I add in:
plugins: ['serverless-webpack', 'serverless-offline'],
So I run the project with the command:
serverless offline --stage dev
As response I have:
**POST | http://localhost:3000/dev/hello
POST | http://localhost:3000/2015-03-31/functions/hello/invocations**
The request with POST http://localhost:3000/dev/hello using body {“name”: “Andre”} don´t answer, I don´t know why the project don´t response to the request, it only show “sending request” in postman and keeps showing this. But if i use the address GET http://localhost:3000 I have a response saying that existing routes are:
{
"currentRoute": "get - /",
"error": "Serverless-offline: route not found.",
"existingRoutes": [
"post - /dev/hello"
],
"statusCode": 404
}
Please, could you help me? What i am doing wrong?
Thank you.