Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lifecycle hook for serverless offline start #131

Merged
merged 1 commit into from
Jul 2, 2017

Conversation

Gregoirevda
Copy link
Contributor

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

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
@Gregoirevda
Copy link
Contributor Author

Gregoirevda commented Jun 9, 2017

Event on serverless-dynamodb-local: https://github.com/99xt/serverless-dynamodb-local/blob/v1/index.js#L94
Event on serverless-offline: https://github.com/dherault/serverless-offline/blob/master/src/index.js#L117

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

Gregoirevda added a commit to Gregoirevda/serverless-dynamodb-local that referenced this pull request Jun 9, 2017
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
Gregoirevda added a commit to Gregoirevda/serverless-offline that referenced this pull request Jun 9, 2017
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
Gregoirevda added a commit to Gregoirevda/serverless-webpack that referenced this pull request Jun 9, 2017
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
@Gregoirevda Gregoirevda mentioned this pull request Jun 9, 2017
@jerep6
Copy link

jerep6 commented Jun 18, 2017

+1

Duplicate but more complete than the PR #105

@HyperBrain
Copy link
Member

I will test this locally with one of our projects (that is invoked with offline without start) to make sure that it does not break this use case. As soon as that works I'll approve it 😄

@HyperBrain
Copy link
Member

Tested -> works without specifying start as before. LGTM from my side.
/cc @hassankhan

@hassankhan
Copy link
Contributor

@HyperBrain HyperBrain merged commit c72c3c5 into serverless-heaven:master Jul 2, 2017
HyperBrain pushed a commit that referenced this pull request Jul 2, 2017
HyperBrain pushed a commit that referenced this pull request Jul 3, 2017
HyperBrain pushed a commit that referenced this pull request Jul 3, 2017
HyperBrain pushed a commit that referenced this pull request Jul 4, 2017
Added #144

Added #132

Added #141

Added #140 and #131

Added release notes
HyperBrain pushed a commit that referenced this pull request Jul 4, 2017
Added #144

Added #132

Added #141

Added #140 and #131

Added release notes
HanbyulJo pushed a commit to HanbyulJo/serverless-webpack that referenced this pull request Nov 28, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants