Comments (4)
Hey, thanks
So I took care of --host, -H
support. While I was at it, I added support for HOST
and PORT
environment variables, which also should have been there.
These options are now available in [email protected]
:
$ PORT=3000 sirv public
$ HOST=0.0.0.0 sirv public
$ sirv public --host 10.0.0.1
from sirv.
Unless you have a reason not too, you could probably add the option and pass the host as the second argument to the server.listen
call.
sirv/packages/sirv-cli/boot.js
Line 61 in 11cc39a
Node docs indicate that the second optional argument is the host.
https://nodejs.org/api/net.html#net_server_listen
from sirv.
Yes, for sure! I thought it was in there already but guess not.
I'll get it in tonight unless you want to beat me to it. Currently away from my computer - back soon
from sirv.
Thanks!
from sirv.
Related Issues (20)
- Enable custom headers for sirv-cli HOT 2
- Please allow setting the network and the local address simultaneously HOT 4
- Default port conflicts with Airplay MacOS Monterey HOT 6
- Dynamic html files HOT 1
- Only handle GET requests that are not WebSocket requests
- sirv tests fail due to whitespace differences in terminal output on cli help test
- Sirv cuts the file if its size increases HOT 3
- Support for "." in pathnames
- Add Changelog HOT 2
- Document "dev mode"
- [feature] option to fail on port conflict HOT 1
- `/foo%2Fbar.txt` returns `/foo/bar.txt`
- Filter files more flexibly HOT 4
- Range request overlap is handled incorrectly HOT 2
- Option to enforce case sensitivity HOT 1
- Add some API to refresh / update the cache HOT 1
- Question: reduce cache size? HOT 2
- net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK) HOT 1
- [Feature Request] New option `base`. (Aka base path, public path, asssets URL root.)
- When static file changed to longer during run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sirv.