add static file serving

This commit is contained in:
Asraelite 2016-03-21 12:56:32 +00:00
parent d0b5aae8f6
commit 4c6eb86794
6 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,7 @@
'use strict';
const socketio = require('socket.io');
class GameServer {
constructor() {

View file

@ -1,8 +0,0 @@
* {
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

View file

@ -1,17 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/png" href="img/favicon.png">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title>
Starbugs
</title>
<script src="starbugs-min.js"></script>
</head>
<body>
<canvas id="starbugs_canvas">
Sorry, your browser does not currently support HTML5 Canvas.
</canvas>
</body>
</html>

View file

@ -1,12 +1,19 @@
'use strict';
const express = require('express');
class WebServer {
constructor() {
}
start() {
this.app = express();
let app = this.app;
app.use(express.static('public'));
app.listen(8080);
}
}