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