更新依赖项,使用 Busboy 替代 formidable 处理文件上传,优化上传逻辑,改进权限检查

This commit is contained in:
2025-12-21 06:41:27 +08:00
parent 15fcfdad18
commit 8a633feb4f
12 changed files with 344 additions and 155 deletions

View File

@@ -3,16 +3,17 @@ import './route.ts';
import { handleRequest } from './routes-simple/handle-request.ts';
import { port } from './modules/config.ts';
import { wssFun } from './modules/ws-proxy/index.ts';
import { WebSocketListenerFun, HttpListenerFun } from '@kevisual/router/src/server/server-type.js';
console.log('Starting server...', port);
app.listen(port, '0.0.0.0', () => {
console.log(`server is running at http://localhost:${port}`);
});
app.server.on([{
id: 'handle-all',
fun: handleRequest,
func: handleRequest as any,
}, {
id: 'wss',
io: true,
path: '/ws/proxy',
fun: wssFun,
func: wssFun as WebSocketListenerFun,
}]);