Title: Follow-up to #245: align runtime port fallbacks in src/server.js with the 4443 config default · Issue #477 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Follow-up to #245: align runtime port fallbacks in src/server.js with the 4443 config default · Issue #477 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Follow-up to #245: align runtime port fallbacks in src/server.js with the 4443 config default · Issue #477 · JavaScriptSolidServer/JavaScriptSolidServer
Description: #245 changed the declared default port from 3000 → 4443 in src/config.js. That PR landed cleanly in April 2026. But three runtime fallbacks in src/server.js were missed — they still read options.port || 3000, so any code path that reache...
Open Graph Description: #245 changed the declared default port from 3000 → 4443 in src/config.js. That PR landed cleanly in April 2026. But three runtime fallbacks in src/server.js were missed — they still read options.po...
X Description: #245 changed the declared default port from 3000 → 4443 in src/config.js. That PR landed cleanly in April 2026. But three runtime fallbacks in src/server.js were missed — they still read options.po...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/477
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Follow-up to #245: align runtime port fallbacks in src/server.js with the 4443 config default","articleBody":"[#245](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/245) changed the declared default port from 3000 → 4443 in `src/config.js`. That PR landed cleanly in April 2026.\n\nBut three runtime fallbacks in `src/server.js` were missed — they still read `options.port || 3000`, so any code path that reaches `createServer()` *without* `options.port` set (no `--port` flag and no config loaded) lands on `3000`, not `4443`:\n\n```\nsrc/server.js:867: const port = options.port || 3000;\nsrc/server.js:1209: const port = options.port || 3000;\nsrc/server.js:1220:export async function startServer(port = 3000, host = '0.0.0.0') {\n```\n\nThis creates a real inconsistency: a user who reads `src/config.js` or `docs/configuration.md` sees `4443`, but in some startup paths (programmatic embedders, tests that call `startServer()` with no port, certain CLI flag combinations) they get `3000`.\n\n## Fix\n\nThree one-line changes:\n\n```js\n// src/server.js:867 + 1209\nconst port = options.port || 4443;\n\n// src/server.js:1220\nexport async function startServer(port = 4443, host = '0.0.0.0') {\n```\n\nOr, more rigorously, import the canonical default from `src/config.js`:\n\n```js\nimport { defaults } from './config.js';\n// ...\nconst port = options.port || defaults.port;\n```\n\nThe second form is the better long-term shape — one source of truth, future port changes only touch `config.js`.\n\n## Test plan\n\n- Grep `grep -nE \"port.*3000|3000.*port\" src/` returns nothing (no leftover `3000` fallbacks in the port resolution path)\n- `bin/jss.js start` with no `--port` lands on 4443\n- Any existing test that called `startServer()` with no port arg still passes (or is updated to pin the expected port explicitly)\n\n## Cross-references\n\n- [#245](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/245) — the change that this follow-up completes\n- [#250](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/250) — earlier port-related bug that motivated the canonicalization","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-18T03:52:05Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/477"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4185bf26-b508-76f3-550c-ce03a1c88765 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A05E:18D8CC:679519:837AA7:6B0393A9 |
| html-safe-nonce | 2778dd23b9c6a57ed1ed0abae2d31abdbc3bfcf78dbb1090eab30b88ebe49ef3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDVFOjE4RDhDQzo2Nzk1MTk6ODM3QUE3OjZCMDM5M0E5IiwidmlzaXRvcl9pZCI6IjU0MzUwNzg0OTQ0ODQ5Mzk5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 02227636f6f2c783a829d659f75a6e901820cdc8ef5e22ce829f9d6f581840a4 |
| hovercard-subject-tag | issue:4466125100 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/477/issue_layout |
| twitter:image | https://opengraph.githubassets.com/567ad1fea88cc0bd26ded36d874af7639ecec9dab475a72cc335332bd21e2cc5/JavaScriptSolidServer/JavaScriptSolidServer/issues/477 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/567ad1fea88cc0bd26ded36d874af7639ecec9dab475a72cc335332bd21e2cc5/JavaScriptSolidServer/JavaScriptSolidServer/issues/477 |
| og:image:alt | #245 changed the declared default port from 3000 → 4443 in src/config.js. That PR landed cleanly in April 2026. But three runtime fallbacks in src/server.js were missed — they still read options.po... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width