From 0794ba54fe3c32aab5984458ddea76eac426eec4 Mon Sep 17 00:00:00 2001 From: M1n-0 <145598371+M1n-0@users.noreply.github.com> Date: Wed, 5 Jun 2024 20:00:03 +0200 Subject: [PATCH] try modif js work --- app.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..214d40c --- /dev/null +++ b/app.js @@ -0,0 +1,19 @@ +const express = require('express'); +const path = require('path'); +const app = express(); +const port = 3000; + +// Serve static files from the "assets" directory +app.use('/assets', express.static(path.join(__dirname, 'assets'))); + +// Serve HTML files from the "html" directory +app.use('/html', express.static(path.join(__dirname, 'html'))); + +// Serve the index.html file at the root URL +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'index.html')); +}); + +app.listen(port, '0.0.0.0', () => { + console.log(`Example app listening at http://localhost:${port}`); +});