From 4cabba2561f55ee6d068d631e3272ff7bf984b37 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Sun, 27 Mar 2022 02:17:26 -0600 Subject: Initial commit - a working dynamic loader with Express --- index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 index.js (limited to 'index.js') diff --git a/index.js b/index.js new file mode 100644 index 0000000..7b9af6d --- /dev/null +++ b/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const path = require('path'); + +const app = express(); +app.route('/').get((req, res) => { + res.sendFile(path.join(__dirname, 'index.html')); +}); + +app.use(express.static('.')); + +app.listen(3000, () => { + console.log('Listening on 3000'); +}); -- cgit v1.2.3-70-g09d2