Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Wait upto 30 seconds for server ready #985

Closed
wants to merge 2 commits into from
Closed

Conversation

thgh
Copy link
Contributor

@thgh thgh commented Nov 9, 2019

Resolves #730

Related: #1007

@benmccann
Copy link
Member

Could we do ports.wait(this.port, { timeout: 30000 }) instead? It looks to me like you can from the port-authority README though I'm not 100% sure. If not, I think making that configurable in port-authority first would be cleaner than trying to work around it here

@thgh
Copy link
Contributor Author

thgh commented May 31, 2020

I like seeing that some process is taking longer than expected, I think in this case it informs the user something's up with their underlying system. Too bad it's not very actionable, but I haven't seen an actual solution so not sure if there is a more helpful message.

alexbjorlig added a commit to alexbjorlig/sapper that referenced this pull request Oct 1, 2020
According to the source code here https://github.com/Rich-Harris/port-authority/blob/bf12e69618cc59dbc0d46a5132902df8a584e39f/src/wait.ts#L3,
we can specify a timeout - and a default timeout of 5 seconds is not
high enough for many bigger express applications (see issue 730).

This PR is simply inspired by the dialog in pull request: sveltejs#985,
but I thought it would just be simpler to create a new one.
@benmccann
Copy link
Member

Sorry this had gone unreviewed for so long. It looks like there's a merge conflict here. Maybe it's better to try to make sure SvelteKit works as desired than trying to get it in here at this point?

@thgh
Copy link
Contributor Author

thgh commented Mar 29, 2021

Sure!

@thgh thgh closed this Mar 29, 2021
@benmccann
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Server is not listening on port 3000" but application is running.
2 participants