fix: serve design studio through the component app production route
This commit is contained in:
1 parent
3987ddbcfe
commit
9a6a2e0a8d
11 files changed
+174
-47
No files matched your search
+4
-18
@@ -1,18 +1,4 @@
|
||||
import { startStudio } from "./studio.ts";
|
||||
|
||||
const studio = await startStudio();
|
||||
const site = Bun.spawn([process.execPath, "dist/server.js"], {
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
stdin: "inherit",
|
||||
env: process.env,
|
||||
});
|
||||
const stop = () => {
|
||||
studio.stop(true);
|
||||
site.kill("SIGTERM");
|
||||
};
|
||||
process.on("SIGINT", stop);
|
||||
process.on("SIGTERM", stop);
|
||||
const code = await site.exited;
|
||||
studio.stop(true);
|
||||
process.exit(code);
|
||||
// Compatibility entry point: Studio is mounted in the app middleware now.
|
||||
const entry = "../dist/server.js";
|
||||
await import(entry);
|
||||
export {};
|
||||
Reference in new issue
Block a user