mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
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.
This commit is contained in:
parent
d71b75b2a6
commit
d1370e9d69
1 changed files with 9 additions and 1 deletions
|
@ -139,7 +139,15 @@ You can create more pages in the `src/pages` directory, and Astro will use the f
|
||||||
npm run dev
|
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)
|
## [Build Astro](#build-astro)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue