feat: v1.1.0 - Swagger docs, mappings, Docker, premium landing page

- Swagger UI interactive docs at /docs
- OpenAPI 3.0 spec at /openapi.json
- mappings field in episodes response (anilistId, malId, kitsuId)
- Docker support (Dockerfile + .dockerignore)
- Premium landing page with try-it buttons (Walter-style)
- Health endpoint with providers list and endpoint count
This commit is contained in:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-09 14:16:33 +05:30
parent 85b8dcfcf0
commit c13e0bbd7e
8 changed files with 538 additions and 37 deletions
+32 -1
View File
@@ -43,12 +43,43 @@ app.use(express.static(path.join(__dirname, "public")));
app.get("/api/health", (req, res) => {
res.json({
status: "ok",
version: "1.0.0",
version: "1.1.0",
timestamp: new Date().toISOString(),
uptime: process.uptime(),
endpoints: 16,
providers: ["kiwi", "pewe", "bee", "bonk", "bun", "ally", "nun", "twin", "cog", "moo", "hop", "telli"],
});
});
// Swagger UI page
app.get("/docs", (req, res) => {
res.send(`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MiruroAPI — Swagger UI</title>
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css">
<style>body{margin:0;background:#0b1622;}</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
<script>
SwaggerUIBundle({
url: "/openapi.json",
dom_id: "#swagger-ui",
presets: [SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset],
layout: "BaseLayout",
deepLinking: true,
defaultModelsExpandDepth: -1,
docExpansion: "list",
});
</script>
</body>
</html>`);
});
// Routes
const apiRoutes = require("./src/routes/apiRoutes");
app.use("/api", apiRoutes);