This commit is contained in:
Rizky 2024-03-07 10:18:26 +07:00
parent 0c8ed6f7d5
commit 8a74cbf127
4 changed files with 5 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -128,8 +128,6 @@ declare global {
index: { head: string[]; body: string[]; render: () => string };
}) => Promise<Response>;
};
function createServer(arg: PrasiServer & { api: any; db: any }): PrasiServer;
}
`
);

View File

@ -23,13 +23,11 @@ export const codeBuild = async (id_site: any) => {
`\
import type {} from "./typings/global";
export const server = createServer({
export const server: PrasiServer = {
async http({ req, handle, mode, url, index, server }) {
return await handle(req);
},
db,
api
});
}
};
`
);
const bun_types = Bun.spawn({

View File

@ -4,7 +4,7 @@ import axios from "axios";
return `BigInt::` + this.toString();
};
let w = (typeof window !== "undefined" ? window : null) as any;
let g = global as any;
let g = (typeof global !== "undefined" ? global : undefined) as any;
export const fetchViaProxy = async (
target_url: string,