1. Summary
It would be nice, if would be possible force use specific port, even if another program already use this port.
2. Environment
- grunt 1.0.2,
- grunt-browser-sync 2.2.0,
- Sublime Text Build 3143,
- SublimeServer 0.3.3.
3. Argumentation
I use SublimeServer for simply opening my HTML files in localhost. I open HTML file in Sublime Text → I run command sublimeserver_browser → HTML file open in browser in format:
http://localhost:3000/path/to/file.html
If I use SublimeServer, I can't make, that BrowserSync force have same port as SublimeServer. I need manually change port number in URL bar for each file. It may take a lot of time.
4. Steps to reproduce
I run SublimeServer in port 3000 → I run grunt-browser-sync in port 3000.
5. Expected behavior
For example, if force_port: true in BrowserSync settings:
Port 3000.
D:\Kristinita>grunt browserSync
Running "browserSync:bsFiles" (browserSync) task
[BS] [HTML Injector] Running…
[Browsersync] Access URLs:
-------------------------------------
Local: http://localhost:3000
External: http://192.168.56.1:3000
-------------------------------------
UI: http://localhost:3001
UI External: http://192.168.56.1:3001
-------------------------------------
[Browsersync] Serving files from: ../
[Browsersync] Watching files…
6. Actual behavior
Port 3001.
D:\Kristinita>grunt browserSync
Running "browserSync:bsFiles" (browserSync) task
[BS] [HTML Injector] Running…
[Browsersync] Access URLs:
-------------------------------------
Local: http://localhost:3001
External: http://192.168.56.1:3001
-------------------------------------
UI: http://localhost:3002
UI External: http://192.168.56.1:3002
-------------------------------------
[Browsersync] Serving files from: ../
[Browsersync] Watching files…
7. Not helped
I try:
- Set
port: 3000 in Gruntfile settings,
- Change port number in SublimeServer settings.
I can't make, that SublimeServer and BrowserSync have same ports.
Also:
- I stop SublimeServer → I run BrowserSync in port 3000 → I run SublimeServer in port 3000 → BrowserSync not synced my files.
Thanks.
1. Summary
It would be nice, if would be possible force use specific port, even if another program already use this port.
2. Environment
3. Argumentation
I use SublimeServer for simply opening my HTML files in localhost. I open HTML file in Sublime Text → I run command
sublimeserver_browser→ HTML file open in browser in format:If I use SublimeServer, I can't make, that BrowserSync force have same port as SublimeServer. I need manually change port number in URL bar for each file. It may take a lot of time.
4. Steps to reproduce
I run SublimeServer in port 3000 → I run grunt-browser-sync in port 3000.
5. Expected behavior
For example, if
force_port: truein BrowserSync settings:Port 3000.
6. Actual behavior
Port 3001.
7. Not helped
I try:
port: 3000in Gruntfile settings,I can't make, that SublimeServer and BrowserSync have same ports.
Also:
Thanks.