chore: rename src/ to server/
This commit is contained in:
14
server/types/ApiCallbackMessage.ts
Normal file
14
server/types/ApiCallbackMessage.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
type ApiCallbackMessage = {
|
||||
msg: string,
|
||||
/**
|
||||
* 200: 成功
|
||||
* 400: 伺服器端無法理解客戶端請求
|
||||
* 401: 需要身份驗證
|
||||
* 403: 伺服器端拒絕執行客戶端請求
|
||||
* 404: Not Found
|
||||
* 500: 伺服器端錯誤
|
||||
* 501: 伺服器端不支持請求的功能
|
||||
*/
|
||||
code: 200 | 400 | 401 | 403 | 404 | 500 | 501,
|
||||
}
|
||||
export default ApiCallbackMessage
|
||||
5
server/types/EventCallbackFunction.ts
Normal file
5
server/types/EventCallbackFunction.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import ApiCallbackMessage from "./ApiCallbackMessage.ts"
|
||||
|
||||
type EventCallbackFunction = (args: {}) => ApiCallbackMessage
|
||||
|
||||
export default EventCallbackFunction
|
||||
6
server/types/HttpServerLike.ts
Normal file
6
server/types/HttpServerLike.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import http from 'node:http'
|
||||
import https from 'node:https'
|
||||
|
||||
type HttpServerLike = http.Server | https.Server
|
||||
|
||||
export default HttpServerLike
|
||||
3
server/types/UnknownFunction.ts
Normal file
3
server/types/UnknownFunction.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
type UnknownFunction = (...args: unknown[]) => unknown
|
||||
|
||||
export default UnknownFunction
|
||||
Reference in New Issue
Block a user