From d1370e9d69476b237c29ad27eefdf4141ae23f1f Mon Sep 17 00:00:00 2001 From: Aleš Vaupotič Date: Wed, 8 Sep 2021 19:36:00 +0200 Subject: Opening app to all IPs instead of localhost (#1339) I see people often ask about opening up the app to local network so this looked like a good place to explain how to do it. --- docs/src/pages/installation.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs/src') diff --git a/docs/src/pages/installation.md b/docs/src/pages/installation.md index 9cedb03ef..44961a7d2 100644 --- a/docs/src/pages/installation.md +++ b/docs/src/pages/installation.md @@ -139,7 +139,15 @@ You can create more pages in the `src/pages` directory, and Astro will use the f npm run dev ``` -Astro will now start serving your application on `http://localhost:3000`. By opening this URL in your browser, you should see the Astro's “Hello, World” +Astro will now start serving your application on `http://localhost:3000`. By opening this URL in your browser, you should see the Astro's “Hello, World”. + +If you need to share your development progress on the local network or check out the app from a phone, just add the following [snowpack](https://www.snowpack.dev/reference/configuration#devoptionshostname) option to `astro.config.mjs`: + +```js +devOptions: { + hostname: "0.0.0.0" +} +``` ## [Build Astro](#build-astro) -- cgit v1.2.3