Files
kazoottt-blog-v2/src/content/note/astro启动报错address not available.md
2025-02-19 17:30:11 +00:00

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
astro
ipv6
node
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

IMG-E0E27B1E55C89D98FD34F1BF53CD0C65

解决方法:

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",
  },
})