-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Force internal port to 8080 #2403
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Left some comments :)
'internal_port', | ||
)} in the fly.toml. | ||
|
||
This means your server app might not be accessible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got confused by this part, what are we trying to say here: if the internal_port
option is not present in the Fly TOML file the server app might not work correctly because Fly won't know how to reach it?
|
||
Press any key to continue or Ctrl+C to cancel.`); | ||
} else { | ||
// the default fly.toml assumes port 8080 (or 3000, depending on flyctl version). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this comment is redundant - we are setting the value to something we want, the default is not really important to know for the reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file, here:
'PORT=8080', |
8080
and we want these two to change at the same time. So, I'd extract the port information into a variable and use it in both places e.g. serverPort
or similar.
@@ -85,6 +85,7 @@ async function setupServer(deploymentInfo: DeploymentInfo<SetupOptions>) { | |||
await $`flyctl launch --no-deploy ${launchArgs}`; | |||
|
|||
const minMachinesOptionRegex = /min_machines_running = 0/g; | |||
const internalPortOptionRegex = /internal_port = \d+/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already defined this regex in the setupClient
fn, and since it's the same thing, I'd extract this regex to the top and use it both setupServer
and setupClient
functions.
Description
This is a proposed fix for #2398. This is similar to a fix that was made to the client setup. Another option would be to change like 120 to
PORT=3000
but my guess is older version offlyctl
used port 8080 and don't want to break those.Select what type of change this PR introduces:
Update Waspc ChangeLog and version if needed
If you did a bug fix, new feature, or breaking change, that affects waspc, make sure you satisfy the following:
Update example apps if needed
If you did code changes and added a new feature or modified an existing feature, make sure you satisfy the following:
waspc/examples/todoApp
as needed (updated modified feature or added new feature) and manually checked it works correctly.waspc/headless-test/examples/todoApp
and its e2e tests as needed (updated modified feature and its tests or added new feature and new tests for it).