serverless-nodejs-starter icon indicating copy to clipboard operation
serverless-nodejs-starter copied to clipboard

Function Routes Defined in file not loaded

Open Captnwalker1 opened this issue 6 years ago • 2 comments

In my working serverless project deployed already to AWS we have our functions defined in seperate yml files. This doesn't seem to work with serverless-offline

functions:
  devices: ${file(resources/functions/devices.yml)}
  load: ${file(resources/functions/load.yml)}
  registration: ${file(resources/functions/registration.yml)}
  getMessages: ${file(resources/functions/getMessages.yml)}
handler: functions/registration.handler
events:
  - http:
      path: /${self:custom.version}/registration
      method: get
      cors: true

I start serverless with sls offline --providedRuntime 11.10.1

I keep getting error

{"statusCode":404,"error":"Serverless-offline: route not found.","currentRoute":"get - /v1/registration","existingRoutes":[]}

Your Environment Information --------------------------- Operating System: darwin Node Version: 11.10.1 Framework Version: 1.51.0 Plugin Version: 1.3.10 SDK Version: 2.1.0

Captnwalker1 avatar Sep 11 '19 19:09 Captnwalker1

Might be better to post it over there instead?

https://github.com/dherault/serverless-offline

jayair avatar Sep 15 '19 00:09 jayair

Whoops totally missed I wasn't in the project's github, thanks!

Captnwalker1 avatar Sep 16 '19 14:09 Captnwalker1