UNPKG

457 BJavaScriptView Raw
1const parsePath = require("./parse/path");
2const httpServer = require("./http/index");
3const socket = require("./socket/index");
4
5const httpConfig = JSON.parse(process.argv[3]);
6const socketConfig = JSON.parse(process.argv[5]);
7
8// http server
9if (httpConfig.directory) {
10 fileRouter = parsePath(httpConfig.directory, httpConfig.label);
11 httpServer(fileRouter, httpConfig);
12}
13
14// mock server
15if (socketConfig.port) {
16 socket.socketServer(socketConfig);
17}
\No newline at end of file