nroggendorff commited on
Commit
8836628
1 Parent(s): 9b20679

Create server.js

Browse files
Files changed (1) hide show
  1. server.js +15 -0
server.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require('express');
2
+ const path = require('path');
3
+
4
+ const app = express();
5
+ const port = 3000;
6
+
7
+ app.use(express.static(path.join(__dirname, 'public')));
8
+
9
+ app.get('/', (req, res) => {
10
+ res.sendFile(path.join(__dirname, 'public', 'index.html'));
11
+ });
12
+
13
+ app.listen(port, () => {
14
+ console.log(`Server running on http://localhost:${port}`);
15
+ });