add static file serving
This commit is contained in:
parent
d0b5aae8f6
commit
4c6eb86794
6 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const socketio = require('socket.io');
|
||||
|
||||
class GameServer {
|
||||
constructor() {
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 245 B |
|
@ -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>
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue