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 instructions on how to use with serverless-offline #104

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,21 @@ The normal Serverless deploy procedure will automatically bundle with Webpack:
- Install Serverless Webpack as above
- Deploy with `serverless deploy`

### Use with serverless-offline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps change to 'Usage'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change it accordingly and also add the --location hint (as long as I'm allowed to do that). Otherwise I open a separate PR with the same changes (as they are trivial) and close this one to get 2.0.0 out later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hassankhan Just saw, that we have 2 sections for serverless-offline. This one and one under "Simulate API Gateway locally". I will combine the two into this one (as we plan to remove serve) and commit that. Then we can just remove the whole "Simulate ..." section together with the serve implementation later.


- Put the serverless-webpack plugin before the serverless-offline plugin in your configuration file.
```yaml
plugins:
- serverless-webpack
- serverless-offline
```

- Let serverless-offline know where the bundles are built
```
> serverless offline start --location .webpack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command line will work as soon as #131 is merged.
The alternative is omitting start, so we may add the serverless command without start here too:
serverless offline --location .webpack

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, @HyperBrain!

```


### Simulate API Gateway locally

To start a local server that will act like the API Gateway use the following command.
Expand Down