feat: swagger

This commit is contained in:
2025-12-19 20:30:00 +03:00
parent 398724a2e0
commit 811efcbfca
7 changed files with 926 additions and 21 deletions

View File

@@ -1,5 +0,0 @@
{
"backendUrl": "http://localhost:3000",
"apiPrefix": "",
"version": "1.0.0"
}

View File

@@ -14,7 +14,9 @@ const __dirname = dirname(__filename);
// файлу в public, то буден выдан данный файл
app.use(express.static(join(__dirname, 'public')));
// Конфигурационный endpoint
// Маршрут с конфигурацией.
// Здесь javascript фронтенда может узнать, по какому адресу
// можно найти API бекенда
app.get('/config.json', (_, res) => {
res.json({
backendUrl: BACKEND_URL,