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

Projects
None yet
4 participants
@Gregoirevda
Copy link
Contributor

Gregoirevda commented Jun 9, 2017

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

Add lifecycle hook for serverless offline start
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

This comment has been minimized.

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: 99xt/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

How to work with a full stack plugins
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

Create README.md
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 Gregoirevda referenced this pull request Jun 9, 2017

Merged

Create README.md #253

Gregoirevda added a commit to Gregoirevda/serverless-webpack that referenced this pull request Jun 9, 2017

Create README.md
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 referenced this pull request Jun 9, 2017

Merged

Create README.md #132

@jerep6

This comment has been minimized.

Copy link

jerep6 commented Jun 18, 2017

+1

Duplicate but more complete than the PR #105

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Jul 1, 2017

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

This comment has been minimized.

Copy link
Member

HyperBrain commented Jul 2, 2017

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

@hassankhan

This comment has been minimized.

Copy link
Contributor

hassankhan commented Jul 2, 2017

@HyperBrain HyperBrain merged commit c72c3c5 into serverless-heaven:master Jul 2, 2017

HyperBrain added a commit that referenced this pull request Jul 2, 2017

HyperBrain added a commit that referenced this pull request Jul 3, 2017

HyperBrain added a commit that referenced this pull request Jul 3, 2017

HyperBrain added a commit that referenced this pull request Jul 4, 2017

Use MD links for issues and pull request references
Added #144

Added #132

Added #141

Added #140 and #131

Added release notes

HyperBrain added a commit that referenced this pull request Jul 4, 2017

Use MD links for issues and pull request references
Added #144

Added #132

Added #141

Added #140 and #131

Added release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment