question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specifying the --port flag seems to have no effect

See original GitHub issue

The --port flag seems to have no effect: $ lite-server --verbose --port=8081 options { port: 8081, openPath: ‘.’, files: [ ‘.//*.html’, './/.css’, './__/.js’ ], baseDir: ‘./’, fallback: ‘/./index.html’ } [BS] Access URLs:


   Local: http://localhost:3000
External: http://<my-ip>:3000

      UI: http://localhost:3001

UI External: http://<my-ip>:3001


So the console output looks as though the server is listening on ports 3000 and 3001 and netstat supports that: $ netstat -at tcp6 0 0 [::]:3000 [::]:* LISTEN
tcp6 0 0 [::]:3001 [::]:* LISTEN

Does browser-sync not support the port option properly?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cgmartincommented, Feb 3, 2016

@ramswaroop OK, I didn’t look closely at your file name… the contents made me think it was a .json file.

To use the bs-config.js format, just make sure to export it just like any other Node.js module:

module.export = { port: 8000 };   // quotes around field properties not required here
1reaction
Steveb-pcommented, Feb 10, 2016

@cgmartin I just slammed the same issue that others had here - my configuration file had no effect even though lite-server readme stated it was the correct way to do it. After a couple of looks into the library I realized that a new major version was out.

Would it be ok if a note were to be added to readme that this behaviour was added in 2.0.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I change the default port (9000) that Play uses when I ...
Using the http.port configuration parameter either on the command line or in the application.conf seems to have no effect: C:\dev\prototype\ ...
Read more >
Chapter 3. Using MacPorts
port is the main utility used to interact with MacPorts. It is used to update Portfile s and the MacPorts infrastructure, and install...
Read more >
Command-line Flags | Nmap Network Scanning
While the tutorial showed how simple executing an Nmap port scan can be, dozens of command-line flags are available to make the system...
Read more >
Configure and Verify Port-Channel on Firepower Appliances
Navigate to Device > Interfaces > EtherChannels and add an EtherChannel. Since in this case the EtherChannel is a trunk specify the ...
Read more >
How To Configure Custom Connection Options for your SSH ...
Often, this file is not created by default, so you may need to create ... RemoteForward : This option is used to define...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found