feat: vercel api use require
This commit is contained in:
parent
6cc452bf60
commit
8facd1c015
|
|
@ -1,11 +1,17 @@
|
|||
import { handle } from 'hono/vercel';
|
||||
import app from '@/app';
|
||||
import logger from '@/utils/logger';
|
||||
const path = require('path');
|
||||
const moduleAlias = require('module-alias');
|
||||
moduleAlias.addAlias('@', path.join(__dirname, '../lib'));
|
||||
|
||||
export const runtime = 'edge';
|
||||
const { setConfig } = require('../lib/config');
|
||||
setConfig({
|
||||
NO_LOGFILES: true,
|
||||
});
|
||||
|
||||
const { handle } = require('hono/vercel');
|
||||
const app = require('../lib/app');
|
||||
const logger = require('../lib/utils/logger');
|
||||
|
||||
logger.info(`🎉 RSSHub is running! Cheers!`);
|
||||
logger.info('💖 Can you help keep this open source project alive? Please sponsor 👉 https://docs.rsshub.app/support');
|
||||
|
||||
export const GET = handle(app);
|
||||
export const POST = handle(app);
|
||||
module.exports = handle(app);
|
||||
|
|
|
|||
Loading…
Reference in New Issue