add basic server classes
This commit is contained in:
parent
07d473f275
commit
d0b5aae8f6
3 changed files with 45 additions and 1 deletions
13
server/game/index.js
Normal file
13
server/game/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
class GameServer {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GameServer;
|
|
@ -1,7 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
function init() {
|
||||
const WebServer = require('./web/');
|
||||
const GameServer = require('./game/');
|
||||
|
||||
class StarbugsServer {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
this.webServer = new WebServer();
|
||||
this.gameServer = new GameServer();
|
||||
|
||||
this.webServer.start();
|
||||
this.gameServer.start();
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
global.starbugs = new StarbugsServer();
|
||||
starbugs.start();
|
||||
}
|
||||
|
||||
module.exports = init;
|
||||
|
|
13
server/web/index.js
Normal file
13
server/web/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
class WebServer {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = WebServer;
|
Loading…
Add table
Add a link
Reference in a new issue