paulmillr / pushserve

Dead-simple pushState-enabled command-line http server.
32 stars 8 forks source link

allow custom hostnames #8

Closed es128 closed 9 years ago

es128 commented 9 years ago

Allow the user to set the IP/hostname the server should listen on instead of always using node's default.

https://github.com/brunch/brunch/issues/929

bradobro commented 9 years ago

@paulmillr I'm finding I need this to collaborate with a new remote worker on platforms such as Nitrous.io and c9.io--they want the server bound to a different port.

I could write a custom server, but I'd probably just copy and paste pushserve so I don't have to rewrite the pushstate stuff.

If I make a PR to allow, say -b --bind, to specify a hostname, would you consider it?

paulmillr commented 9 years ago

why not -h?

bradobro commented 9 years ago

Pushserve uses -h to alias --help. Could just do --host, or make --help the only way to get help.

bradobro commented 9 years ago

nvm, looks looks like @yavorsky added this in 4540da01b218649e699e819f5110d9516b691812, I'll PR the readme.

bradobro commented 9 years ago

Thanks @paulmillr could you release 1.6.1 to npm so the hostname prints out correctly in brunch (cf. brunch/brunch#929)