初次提交

This commit is contained in:
MoonLeeeaf
2025-03-15 00:15:44 +08:00
commit 0559f0ecaa
7 changed files with 1421 additions and 0 deletions

45
server/main.js Normal file
View File

@@ -0,0 +1,45 @@
import http from 'node:http'
// import https from 'node:https' // 暂时
import express from 'express'
import { Server as SocketIoServer } from 'socket.io'
const app = express()
const httpApp = http.createServer(app)
const io = new SocketIoServer(httpApp, {})
class ThewhiteSilkParams {
/**
* @type { String }
*/
method
/**
* @type { Object }
*/
args
}
const events = []
import { UserApi } from './api/User.js'
for (let i of [
UserApi
]) {
for (let i2 of Object.keys(i)) {
events.push(i[i2])
}
}
io.on("connection", (socket) => {
socket.on('the_white_silk',
/**
* @param { ThewhiteSilkParams } params
* @param { Function } callback
*/
(params, callback) => {
if ((params || callback) == null) return;
}
)
})
httpApp.listen(80)