aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;