add static file serving
This commit is contained in:
parent
d0b5aae8f6
commit
4c6eb86794
6 changed files with 9 additions and 0 deletions
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
|
@ -1,5 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const socketio = require('socket.io');
|
||||||
|
|
||||||
class GameServer {
|
class GameServer {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const express = require('express');
|
||||||
|
|
||||||
class WebServer {
|
class WebServer {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
this.app = express();
|
||||||
|
let app = this.app;
|
||||||
|
|
||||||
|
app.use(express.static('public'));
|
||||||
|
|
||||||
|
app.listen(8080);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue