This commit is contained in:
xiao.xiong
2025-10-19 23:46:41 +08:00
parent 7bbf6e6a18
commit 39a70de606
5 changed files with 394 additions and 0 deletions

25
server/src/app.ts Normal file
View File

@@ -0,0 +1,25 @@
import { App } from '@kevisual/router'
import { sendDefaultSipMessage } from './lib.ts';
const app = new App();
// http://localhost:3001/api/router?path=floor
app.route({
path: 'floor'
}).define(async (ctx) => {
await sendDefaultSipMessage();
ctx.body = 'SIP消息已发送';
}).addTo(app)
app.route({
path: 'test'
}).define(async (ctx) => {
ctx.body = 'SIP消息已发送';
}).addTo(app)
app.listen(3001, "::", () => {
console.log('Server is running on http://localhost:3001');
})
// curl http://localhost:3001/api/router?path=test