Repository navigation
Add lifecycle hook for serverless offline start - #131
Conversation
Serverless offline has 2 root commands to start : - `serverless offline` which triggers `offline:start` life cycle hook (This is working) - `serverless offline start` which triggers `offline:start:init` and `offline:start:end` life cycle hooks (This is NOT working) The second one is important, because it has an event on start up and on end. If you want to work with serverless-offline, serverless-webpack and serverless-dynamodb-local. You need to call `sls offline start` which will also stop the db and stop serverless offline
|
Event on serverless-dynamodb-local: https://github.com/99xt/serverless-dynamodb-local/blob/v1/index.js#L94 Pull request on documentation of serverless-dynamodb-local: 99x/serverless-dynamodb-local#105 Pull request on documentation of serverless-offline: dherault/serverless-offline#253 Pull request on serverless-webpack documentation: #132 |
This is part off this change in serverless-webpack: serverless-heaven/serverless-webpack#131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local
This is part off this change in serverless-webpack: serverless-heaven/serverless-webpack#131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local
This is part off this change in serverless-webpack: serverless-heaven#131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local
|
+1 Duplicate but more complete than the PR #105 |
|
I will test this locally with one of our projects (that is invoked with |
|
Tested -> works without specifying |
This is part off this change in serverless-webpack: serverless-heaven/serverless-webpack#131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local
Serverless offline has 2 root commands to start :
serverless offlinewhich triggersoffline:startlife cycle hook (This is working)serverless offline startwhich triggersoffline:start:initandoffline:start:endlife cycle hooks (This is NOT working)The second one is important, because it has an event on start up and on end.
If you want to work with serverless-offline, serverless-webpack and serverless-dynamodb-local. You need to call
sls offline startwhich will also stop the db and stop serverless offline