Skip to content

Commit 9f07ef0

Browse files
committed
Added tastings, colleagues and wines swagger docs & favicon.ico
1 parent eb24ff8 commit 9f07ef0

11 files changed

Lines changed: 1563 additions & 30 deletions

File tree

server/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import cors from "cors";
2+
import path from "path";
23
import dotenv from "dotenv";
34
import morgan from "morgan";
45
import express from "express";
@@ -29,6 +30,8 @@ app.use(express.json());
2930
app.use(cookieParser());
3031
app.use(cors({ origin: "http://localhost:5173" }));
3132

33+
app.use(express.static(path.join(process.cwd(), "public")));
34+
3235
const SERVER_PORT = parseInt(process.env.SERVER_PORT || "3001", 10);
3336
app.listen(SERVER_PORT, () => {
3437
console.log(`\x1b[42m[*]\x1b[0m \x1b[92mBackend listening on \x1b[1m${SERVER_PORT}...\x1b[0m`);
@@ -39,6 +42,8 @@ app.use(
3942
swaggerDocs.swaggerUi.serve,
4043
swaggerDocs.swaggerUi.setup(swaggerDocs.specs, {
4144
explorer: true,
45+
customfavIcon: "/favicon.ico",
46+
customSiteTitle: "SommelIO API Docs",
4247
customCssUrl: "https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.min.css",
4348
}),
4449
);

server/public/favicon.ico

4.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)