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

Add dev-port-timeout opt to dev command #1632

Closed
wants to merge 1 commit into from

Conversation

jrschumacher
Copy link
Contributor

@jrschumacher jrschumacher commented Nov 16, 2020

Added support for --dev-port-timeout to solve Server is not listening on port XXXX within some environments. (#1007 #730 #486 #431)

Failing lint job is solved in #1633

Tests were not implemented since I could not find any existing tests covering src/api/dev.ts or src/cli.ts.

./sapper dev -h

  Description
    Start a development server

  Usage
    $ sapper dev [options]

  Options
    //...
    --dev-port            Specify a port for development server
    --dev-port-timeout    Specify a timeout for the dev port watcher  (default 5000)
   //...

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@@ -22,6 +22,7 @@ prog.command('dev')
.option('-p, --port', 'Specify a port')
.option('-o, --open', 'Open a browser window')
.option('--dev-port', 'Specify a port for development server')
.option('--dev-port-timeout', 'Specify a timeout for the dev port watcher', 5000)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the duplicate default value to communicate the default value via CLI help menu.

@benmccann
Copy link
Member

Thanks, but we won't be adding any new options since we're focused on SvelteKit right now.

@benmccann benmccann closed this Nov 16, 2020
@jrschumacher
Copy link
Contributor Author

@benmccann I get that, but this is a blocker for some, including myself. Without this I cannot use Sapper without running from my fork. I'm happy to change this to hardcode a value >5s.

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.

None yet

2 participants