1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 13:58:08 +00:00

fixed root

This commit is contained in:
Nebel 2024-03-23 19:54:27 +09:00
parent 6a43e9ddbe
commit 07d437da3d
Signed by: nebel
GPG key ID: 79807D08C6EF6460
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,9 @@ const app = async (fastify, opts) => {
if (opts.dev) { if (opts.dev) {
const astro = await import("astro"); const astro = await import("astro");
const astroDevServer = await astro.dev(); const astroDevServer = await astro.dev({
root: fileURLToPath(import.meta.resolve(".")),
});
await fastify.register(await import("@fastify/http-proxy"), { await fastify.register(await import("@fastify/http-proxy"), {
upstream: `http://localhost:${astroDevServer.address.port}`, upstream: `http://localhost:${astroDevServer.address.port}`,
}); });

View file

@ -8,7 +8,9 @@ const app = async (fastify, opts) => {
if (opts.dev) { if (opts.dev) {
const astro = await import("astro"); const astro = await import("astro");
const astroDevServer = await astro.dev(); const astroDevServer = await astro.dev({
root: fileURLToPath(import.meta.resolve(".")),
});
await fastify.register(await import("@fastify/http-proxy"), { await fastify.register(await import("@fastify/http-proxy"), {
upstream: `http://localhost:${astroDevServer.address.port}`, upstream: `http://localhost:${astroDevServer.address.port}`,
}); });