-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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 offline
which triggersoffline:start
life cycle hook (This is working)serverless offline start
which triggersoffline:start:init
andoffline: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