@Rich-Harris , Can i change host? By default is localhost, i want use 0.0.0.0
The default is already to listen on all interfaces (:: for IPv6 and 0.0.0.0 for IPv4). The host that Sapper listens on is controlled in your application code. If you're based on the default templates, that would be here. No host argument is passed to .listen(), so the server does not bind to a particular interface.
@Conduitry, thanks for answer!
@khaninD Are you able to post your solution? I've tried making changes to server.js to allow setting the host to 0.0.0.0 and haven't been successful thus far.
um... try https://nodejs.org/dist/latest-v9.x/docs/api/net.html#net_server_listen_options_callback
Also better way for production is reverse proxy or even https://www.phusionpassenger.com/
Are you able to post your solution? I've tried making changes to server.js to allow setting the host to 0.0.0.0 and haven't been successful thus far.
Thanks for the reply @bato3 - I feel ridiculous. I was trying to open my app on another machine to aid development from npm run dev and the only thing needing changed was not server.js but rather identifying my home network as private and not public in network settings.
Would be cool if Sapper could log to the console the link through which the dev server can be viewed on other devices. Right now, sapper dev only gives
> Listening on http://localhost:3000
whereas pure Svelte using rollup -c -w prints
Your application is ready~! 馃殌
- Local: http://0.0.0.0:5000
- Network: http://10.248.97.251:5000
Most helpful comment
Would be cool if Sapper could log to the console the link through which the dev server can be viewed on other devices. Right now,
sapper devonly giveswhereas pure Svelte using
rollup -c -wprints