更新依赖项,使用 Busboy 替代 formidable 处理文件上传,优化上传逻辑,改进权限检查
This commit is contained in:
@@ -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,
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user