INNER CODE UNIT · TypeScript
createHonoApp
timgit/pg-boss · packages/dashboard/app/server.ts:83
export function createHonoApp ({
build: givenBuild,
mode,
serveStaticAssets = false,
clientRoot = './build/client',
databases,
basePath,
auth = true,
allowedActionOrigins,
overlay,
}: CreateHonoAppOptions): Hono {
const app = new Hono()
const rehomed = typeof givenBuild === 'function' ? givenBuild : withBasePath(givenBuild, basePath)
const build = typeof rehomed === 'function' || !allowedActionOrigins
? rehomed
: { ...rehomed, allowedActionOrigins }
const mountPath = typeof build !== 'function' && build.basename && build.basename !== '/' ? build.basename : ''