mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 05:04:56 +08:00
16 lines
427 B
TypeScript
16 lines
427 B
TypeScript
import { serve } from "@hono/node-server";
|
|
import { config } from "./config.js";
|
|
import logger from "./utils/logger.js";
|
|
import app from "./app.js";
|
|
|
|
// 启动服务器
|
|
const serveHotApi = serve({
|
|
fetch: app.fetch,
|
|
port: config.PORT,
|
|
});
|
|
|
|
logger.info(`🔥 DailyHot API 成功在端口 ${config.PORT} 上运行`);
|
|
logger.info(`🔗 Local: 👉 http://localhost:${config.PORT}`);
|
|
|
|
export default serveHotApi;
|