mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-24 11:11:29 +08:00
1.3 KiB
1.3 KiB
title, date, author, tags, toAstro, slug, description, date_created, date_modified, category
title | date | author | tags | toAstro | slug | description | date_created | date_modified | category | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|
astro启动报错address not available | 2024-03-03T00:00:00.000Z | KazooTTT |
|
true | astroaddress-not-available | To resolve the issue with the Astro configuration, modify the `astro.config.mjs` file by setting the `server.host` to `0.0.0.0`. This change allows the server to accept connections from any IP address, enhancing accessibility and functionality of the application. The updated configuration includes integrations for MDX, sitemap, and Tailwind, ensuring a robust and optimized web development setup. | 2025-01-04T03:34:08.000Z | 2025-02-07T03:25:34.000Z | 前端 |
Astro 启动报错 address not Available
解决方法:
在 astro.config.mjs
修改 server.host 为 0.0.0.0
import { defineConfig } from "astro/config"
import mdx from "@astrojs/mdx"
import sitemap from "@astrojs/sitemap"
import tailwind from "@astrojs/tailwind"
// https://astro.build/config
export default defineConfig({
site: "https://astrofy-template.netlify.app",
integrations: [mdx(), sitemap(), tailwind()],
server: {
host: "0.0.0.0",
},
})