Http-server: --port is broken

Created on 26 Sep 2019  路  9Comments  路  Source: http-party/http-server

Do you want to request a feature or report a bug?

If the issue is a bug report, please provide the steps to reproduce it. Please include the actual command causing the issue if applicable.

http-server --port 3001

What did you expect to happen?

Server should treat http-server --port 3001 exactly like http-server -p 3000

I actually made the PR that did this. It happened here: https://github.com/http-party/http-server/pull/468

What actually happened? Please include the actual error trace and / or stack trace if applicable.

http-server uses the default port: 3000

If the issue is a feature request, what is the motivation / use case for it?

Tell us about your environment
macOS

  • http-server version:
    0.11.1
  • Platform:
    macOS
    Other information (related issues, suggestions for a fix, etc):

Most helpful comment

From @johnstonmatt's comment, a new release on NPM is needed? The latest one on NPM was 2 years ago.

All 9 comments

@BigBlueHat could you please let me know how I might fix this issue? I think the new argv parser is broken

I haven't been able to replicate this on Ubuntu 18.04.3.

@x4th I have fixed an error in the issue description, are you using -p or --port ? I am able to configure the port using -p but not with --port

Using --port.
Screenshot from 2019-10-11 18-27-57

@x4th thanks for your help! May I ask which version of http-server are you using?

I just cloned it from here, master branch, version 0.11.1.

@x4th by cloning this repo, I also have no issue. However after installing it via npm at version 0.11.1 the issue is present

first thing I found on osx. I can reproduce. -p works find though

From @johnstonmatt's comment, a new release on NPM is needed? The latest one on NPM was 2 years ago.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EvgeniGordeev picture EvgeniGordeev  路  4Comments

dKab picture dKab  路  7Comments

arthurkhlghatyan picture arthurkhlghatyan  路  3Comments

jiyinyiyong picture jiyinyiyong  路  6Comments

jondlm picture jondlm  路  6Comments