mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.19k stars 501 forks source link

Allow for custom host #2298

Open Ryuno-Ki opened 3 years ago

Ryuno-Ki commented 3 years ago

Allow to define a host (according to Express.js documentation this would be the second argument to

https://github.com/mdn/yari/blob/ae2020b71cc928b4cb31efee794f355b865fb120/server/index.js#L240

) so a local instance could be checked from other devices on the same network, by passing in 0.0.0.0. Useful when testing with a mobile (resp. the screenreader there, in my case).

peterbe commented 3 years ago

Doesn't Expression already listen to some default environment variables? Can you find out?

Ryuno-Ki commented 3 years ago

It does. NODE_ENV for production environments and DEBUG for trouble shooting.

Searching through the codebase, I can't spot further environment variables (except in testing or benchmarking scenarios).