mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
build(api): bundle the api instead of transpiling at boot (#2227)
This commit is contained in:
1 parent
ba54b61dcf
commit
5f6f9428ac
11 files changed
+197
-30
No files matched your search
@@ -1,14 +1,13 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import type {Hono} from 'hono';
|
||||
import {RateLimitMiddleware} from '../middleware/RateLimitMiddleware';
|
||||
import {RateLimitConfigs} from '../RateLimitConfig';
|
||||
import type {HonoEnv} from '../types/HonoEnv';
|
||||
import {resolveAssetPath} from '../utils/AssetPaths';
|
||||
|
||||
const SPEC_PATH = path.join(path.dirname(fileURLToPath(import.meta.url)), 'openapi.json');
|
||||
const SPEC_PATH = resolveAssetPath('openapi', 'openapi.json');
|
||||
const SPEC_BODY = fs.readFileSync(SPEC_PATH, 'utf-8');
|
||||
|
||||
export function OpenAPIController(app: Hono<HonoEnv>): void {
|
||||
|
||||
Reference in new issue
Block a user