fix(webhook): make webhook server port configurable via WEBHOOK_PORT#2435
Open
evenisse wants to merge 1 commit into
Open
fix(webhook): make webhook server port configurable via WEBHOOK_PORT#2435evenisse wants to merge 1 commit into
evenisse wants to merge 1 commit into
Conversation
c68339d to
2c2bb85
Compare
The webhook server was hardcoded to port 3000 with no way to override it from .env. Add WEBHOOK_PORT to the env config read list and export it from config.ts so installations sharing port 3000 with another service can set an alternative port.
2c2bb85 to
7016d22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
The webhook server was hardcoded to bind on port 3000 with no way to override it from
.env. On installations where another service already uses port 3000, this caused a fatalEADDRINUSEcrash on every startup, triggering the circuit breaker and leaving thenclCLI socket stale (ECONNREFUSED).Changes:
src/config.ts: addWEBHOOK_PORTto thereadEnvFilekey list and export it asWEBHOOK_PORTconstant (respectsprocess.env.WEBHOOK_PORT→.env→ default3000)src/webhook-server.ts: replace the inlineprocess.env.WEBHOOK_PORTread andDEFAULT_PORTconstant with the importedWEBHOOK_PORTfrom configUsage: set
WEBHOOK_PORT=3001(or any free port) in.envto move the webhook server off port 3000.