aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2019-04-17 21:12:48 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2019-04-17 21:12:48 -0500
commit7693b644180745beca027e3d0fe771786f961e8c (patch)
tree5c5b15964254b64d82ff88010db453efdb6e603e
parent22a992855dbfa09760204bf8f69075bb1a143e18 (diff)
Add static directory
-rw-r--r--index.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/index.js b/index.js
index 792950a..ae9d9d0 100644
--- a/index.js
+++ b/index.js
@@ -3,9 +3,8 @@ const path = require('path');
const app = express();
-app.get('/', (req, res) => {
- res.sendFile(path.join(__dirname, 'public', 'index.html'));
-});
+// Set static directory
+app.use(express.static(path.join(__dirname, 'public')));
const PORT = process.env.PORT || 3000;