try modif js work

This commit is contained in:
M1n-0
2024-06-05 20:00:03 +02:00
parent 0ce6235664
commit 0794ba54fe

19
app.js Normal file
View File

@@ -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}`);
});