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

fix(gatsby): use host param for express again #36186

Merged
merged 1 commit into from Jul 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/gatsby/src/utils/start-server.ts
Expand Up @@ -800,12 +800,8 @@ export async function startServer(
* Set up the HTTP server and socket.io.
**/
const server = new http.Server(app)

const socket = websocketManager.init({ server })

// hardcoded `localhost`, because host should match `target` we set
// in http proxy in `develop-proxy`
const listener = server.listen(program.port, `localhost`)
const listener = server.listen(program.port, program.host)

if (!process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {
const chokidar = require(`chokidar`)
Expand Down