serverless-offline
serverless-offline copied to clipboard
Any way to deactivate http-proxy ?
I'm searching for a way to deactivate http-proxy on dev. So http proxy do not seems to work for my resources in serverless offline so i turned resourceRoutes to false. My idea is my lambda is actually going to serve the right data but on dev only. Unfortunately it only works if i comment out the events or else i get conflicting routes...

My current way to deal with this is to comment the code and get my ci/cd to uncomment it... That's pretty ugly. I'm wondering if there is anyway to make it works without comments ?
Something like that will probably work:
plugins:
- serverless-plugin-ifelse
custom:
serverlessIfElse:
- If: '"${env:IS_OFFLINE, "0"}" == "1"'
Exclude:
- functions.marketracoon-spa.events[0]
- functions.marketracoon-spa.events[1]
- functions.marketracoon-spa.events[2]
needs IS_OFFLINE=1 sls offline start