commit 6bb93634c092f2600587e095b89762a1ee1eb74e Author: kalugin66 Date: Fri May 1 12:54:43 2026 +0500 Загрузить файлы в «/» diff --git a/package.json b/package.json new file mode 100644 index 0000000..beabee0 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "express": "^5.2.1" + } +} diff --git a/server.js b/server.js new file mode 100644 index 0000000..44a9f8d --- /dev/null +++ b/server.js @@ -0,0 +1,16 @@ +const express = require('express'); +const path = require('path'); + +const app = express(); +const PORT = process.env.PORT || 3000; + +// Раздача статических файлов из папки public +app.use(express.static(path.join(__dirname, 'public'))); + +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'public', 'index.html')); +}); + +app.listen(PORT, () => { + console.log(`Сервер Hotel 777 запущен: http://localhost:${PORT}`); +}); \ No newline at end of file