feat: optimize config loader

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2022-04-19 09:29:57 +08:00
parent 83cad2f52e
commit 46729b9cf0
20 changed files with 304 additions and 228 deletions

View File

@@ -2,7 +2,6 @@
* Module dependencies.
*/
import * as server from "../server"
// const http = require("http")
// const Server = require("./server")
import { Server } from './server'
@@ -18,7 +17,7 @@ import { Server } from './server'
function attach(srv, options) {
const engine = new Server(options)
engine.attach(server.attach(srv, options), options)
engine.attach(srv, options)
return engine
}