Skip to content
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
Add instructions on how to use with serverless-offline
Adding a brief instructional section on how to use this plugin with serverless-offilne. I had to dig around a while to discover that you need the --location flag.
  • Loading branch information
darthtrevino authored Feb 19, 2017
commit 18cf0b436c02ccef88aa1239ae1cecc2f5dcc560
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