消毒机设备
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
649 B

// const express = require('express')
import express from 'express'
import { authRoutes } from './routes/auth.js'
import { debugRoutes } from './routes/control.js'
import { oreRoutes } from './routes/ore.js'
import { pointRoutes } from './routes/point.js'
import { initWebSocketServer } from './utils/websocket.js'
const app = express()
const PORT = 8080 // 可根据需要更改端口号
app.listen(PORT, () => {
console.log(`服务器已启动,正在监听端口 ${PORT}`)
})
app.use(express.json())
// 初始化 WebSocket 服务
initWebSocketServer()
// 注册路由模块
debugRoutes(app)
authRoutes(app)
oreRoutes(app)
pointRoutes(app)