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 options to allow port and listening interface to be changed #12

Merged
merged 1 commit into from
Jul 5, 2019
Merged

Add options to allow port and listening interface to be changed #12

merged 1 commit into from
Jul 5, 2019

Conversation

adam-nielsen
Copy link
Contributor

Small change to allow the port number to be changed in serverless.yml. Structure was borrowed from serverless-offline-s3-local.

Copy link
Owner

@marconi1992 marconi1992 left a comment

Choose a reason for hiding this comment

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

Thanks for the PRs, everything is good just a concern with the serverless-offline configuration

this.config = Object.assign(
{},
defaultConfig,
(this.service.custom || {})['serverless-offline'],
Copy link
Owner

Choose a reason for hiding this comment

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

We'll have port conflicts if we use serverless-offline + serverless-offline-lambda plugins at the same time because the server that emulates API gateway is a different one than for emulating Lambda invocations.

custom:
  serverless-offline:
    port: 4000

Using the configuration above the lambda server will try to use the same port than API Gateway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought the same thing, but this is the way the offline S3 plugin works as well. I think it's actually a feature more than a bug, in that if you change the Serverless port only, things will fail because you then need to specify all the ports. I can't think of any other reason why they'd have done it that way, unless there are other Serverless config options that plugins may need to inherit?

Copy link
Owner

Choose a reason for hiding this comment

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

Gotcha!! I didn't notice that on the S3 plugin before. Regarding the config options, nothing comes to mind so far, but I'll try to figure out what is missng and come back with something in this thread. thanks!!

@marconi1992 marconi1992 merged commit 0ac1594 into marconi1992:master Jul 5, 2019
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.

None yet

2 participants