This commit is contained in:
Avad3 2024-07-14 05:16:54 -04:00
parent 555ae496a5
commit b448c5505b
20 changed files with 104 additions and 71 deletions

View file

@ -4,10 +4,8 @@ import { createServer } from "http";
import Fastify from "fastify";
import fastifyStatic from "@fastify/static";
import { join } from "node:path";
import fs from "node:fs"
import { spawn } from "node:child_process"
import { fileURLToPath } from "node:url";
import { loadConfigFile } from "rollup/loadConfigFile"
//transports
import { baremuxPath } from "@mercuryworkshop/bare-mux/node"
@ -71,7 +69,7 @@ fastify.listen({
port: process.env.PORT || 1337
});
const watch = spawn("rollup", ["-c", "-w"], { detached: true });
const watch = spawn("pnpm", ["rollup", "-c", "-w"], { detached: true, cwd: process.cwd() });
watch.stdout.on("data", (data) => {
console.log(`${data}`);
@ -79,4 +77,4 @@ watch.stdout.on("data", (data) => {
watch.stderr.on("data", (data) => {
console.log(`${data}`);
});
});