mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 13:58:08 +00:00
fixed root
This commit is contained in:
parent
6a43e9ddbe
commit
07d437da3d
2 changed files with 6 additions and 2 deletions
|
@ -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}`,
|
||||||
});
|
});
|
||||||
|
|
|
@ -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}`,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue