fix
This commit is contained in:
parent
ec75bd048c
commit
17671ec0e4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ export const createServer = async () => {
|
|||
} as WebSocketHandler<WSData>,
|
||||
async fetch(req, server) {
|
||||
const url = new URL(req.url);
|
||||
console.log(req.url);
|
||||
|
||||
if (wsHandler[url.pathname]) {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in New Issue