diff --git a/app/web/src/render/live/logic/init.tsx b/app/web/src/render/live/logic/init.tsx index f5fdf2be..1025d728 100644 --- a/app/web/src/render/live/logic/init.tsx +++ b/app/web/src/render/live/logic/init.tsx @@ -49,6 +49,7 @@ export const initLive = async (p: PG, domain: string) => { } if ( location.hostname === "prasi.app" || + location.hostname === "prasi.web.andromedia.co.id" || location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.hostname === "10.0.2.2" // android localhost diff --git a/app/web/src/sworker.ts b/app/web/src/sworker.ts index f4d4a85f..6ce91091 100644 --- a/app/web/src/sworker.ts +++ b/app/web/src/sworker.ts @@ -72,7 +72,6 @@ addEventListener("message", async (e) => { } break; case "define-route": - console.log("defining route", e.data.routes); g.router = createRouter({ strictTrailingSlash: false }); for (const route of e.data.routes) { g.router.insert(route.url, route); diff --git a/package.json b/package.json index 8c5edf75..f9da7524 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "bun clean && bun run --silent --watch ./pkgs/core/index.ts dev", "clean": "rm -rf app/static && rm -rf app/web/.parcel-cache", "build": "bun run --silent ./pkgs/core/build.ts", - "db-pull": "bun run --silent ./pkgs/core/db-pull.ts", + "db-pull": "bun run ./pkgs/core/db-pull.ts", "prod": "bun run --silent ./pkgs/core/index.ts", "local-prod": "bun run build && bun run db-pull && bun run ./pkgs/core/index.ts", "pull": "cd app/db && bun prisma db pull && bun prisma generate", diff --git a/pkgs/core/db-pull.ts b/pkgs/core/db-pull.ts index 3ce14fa0..6f6b6ec4 100644 --- a/pkgs/core/db-pull.ts +++ b/pkgs/core/db-pull.ts @@ -1,11 +1,14 @@ +import { spawn } from "bun"; import { dir } from "dir"; -import { $ } from "execa"; -await $({ +await spawn({ + cmd: ["bun", "prisma", "db", "pull"], cwd: dir.path("app/db"), stdio: ["ignore", "inherit", "inherit"], -})`bun prisma db pull`; -await $({ +}).exited; + +await spawn({ + cmd: ["bun", "prisma", "generate"], cwd: dir.path("app/db"), stdio: ["ignore", "inherit", "inherit"], -})`bun prisma generate`; +}).exited; diff --git a/pkgs/core/server/create.ts b/pkgs/core/server/create.ts index 3e17d0dd..cdefdb17 100644 --- a/pkgs/core/server/create.ts +++ b/pkgs/core/server/create.ts @@ -55,7 +55,6 @@ export const createServer = async () => { } as WebSocketHandler, async fetch(req, server) { const url = new URL(req.url); - console.log(req.url); if (wsHandler[url.pathname]) { if (