mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
fix watch building
This commit is contained in:
parent
5c8582bf88
commit
6c2d542d3e
1 changed files with 11 additions and 1 deletions
12
server.js
12
server.js
|
@ -5,8 +5,8 @@ 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 { watch } from "rollup"
|
||||
import { loadConfigFile } from "rollup/loadConfigFile"
|
||||
|
||||
//transports
|
||||
|
@ -69,4 +69,14 @@ fastify.register(fastifyStatic, {
|
|||
})
|
||||
fastify.listen({
|
||||
port: process.env.PORT || 1337
|
||||
});
|
||||
|
||||
const watch = spawn("rollup", ["-c", "-w"], { detached: true });
|
||||
|
||||
watch.stdout.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
|
||||
watch.stderr.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue