mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 16:46:00 +00:00
Merge remote-tracking branch 'origin/main' into release/0.12
# Conflicts: # app/__test__/modules/ModuleManager.spec.ts # app/src/modules/ModuleManager.ts
This commit is contained in:
@@ -4,6 +4,7 @@ import { $console, config } from "core";
|
||||
import type { MiddlewareHandler } from "hono";
|
||||
import open from "open";
|
||||
import { fileExists, getRelativeDistPath } from "../../utils/sys";
|
||||
import type { App } from "App";
|
||||
|
||||
export const PLATFORMS = ["node", "bun"] as const;
|
||||
export type Platform = (typeof PLATFORMS)[number];
|
||||
@@ -32,7 +33,7 @@ export async function attachServeStatic(app: any, platform: Platform) {
|
||||
|
||||
export async function startServer(
|
||||
server: Platform,
|
||||
app: any,
|
||||
app: App,
|
||||
options: { port: number; open?: boolean },
|
||||
) {
|
||||
const port = options.port;
|
||||
|
||||
@@ -77,12 +77,12 @@ async function makeApp(config: MakeAppConfig) {
|
||||
app.emgr.onEvent(
|
||||
App.Events.AppBuiltEvent,
|
||||
async () => {
|
||||
await attachServeStatic(app, config.server?.platform ?? "node");
|
||||
app.registerAdminController();
|
||||
|
||||
if (config.onBuilt) {
|
||||
await config.onBuilt(app);
|
||||
}
|
||||
|
||||
await attachServeStatic(app, config.server?.platform ?? "node");
|
||||
app.registerAdminController();
|
||||
},
|
||||
"sync",
|
||||
);
|
||||
@@ -92,7 +92,7 @@ async function makeApp(config: MakeAppConfig) {
|
||||
}
|
||||
|
||||
export async function makeConfigApp(_config: CliBkndConfig, platform?: Platform) {
|
||||
const config = makeConfig(_config, { env: process.env });
|
||||
const config = makeConfig(_config, process.env);
|
||||
return makeApp({
|
||||
...config,
|
||||
server: { platform },
|
||||
|
||||
Reference in New Issue
Block a user