Given Eleventy is launched through a Docker instance
When I run eleventy --serve --host 0.0.0.0
Then UI is served http://0.0.0.0:8080
$ eleventy serve --help
--serve
Run web server on --port (default 8080) and watch them too
--host
Host to bind to (default localhost)
This would be useful for several use cases. Just thinking that there should be a disclaimer to note that the serve mode is only meant for development, not for production usage (as someone will likely end up using it for that too…).
This is exposed in the config API but not as a CMD line param: https://browsersync.io/docs/options#option-host
https://www.11ty.io/docs/config/#override-browsersync-server-options
@zachleat Thanks for pointing in the right direction. 🙏
Ideally I wish I could pass many configuration files to be able to only add this to a specific environment without having to copy my default config. But maybe is there another way to achieve this:
ELEVENTY_ENV=staging eleventy --serve --config=.eleventy.js,.eleventy.staging.js
Most helpful comment
This is exposed in the config API but not as a CMD line param: https://browsersync.io/docs/options#option-host
https://www.11ty.io/docs/config/#override-browsersync-server-options