From 6bb93634c092f2600587e095b89762a1ee1eb74e Mon Sep 17 00:00:00 2001 From: kalugin66 Date: Fri, 1 May 2026 12:54:43 +0500 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 +++++ server.js | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 package.json create mode 100644 server.js 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