fix local development
This commit is contained in:
@@ -5,6 +5,7 @@ dotenv.config();
|
||||
export const Config = {
|
||||
api_key: process.env.API_KEY,
|
||||
port: process.env.PORT || "8080",
|
||||
env_dev: process.env.ENV_DEV || false,
|
||||
|
||||
tidal: {
|
||||
host: process.env.TIDAL_HOST || "",
|
||||
|
||||
@@ -33,7 +33,7 @@ await fastify.register(fastifySwagger, {
|
||||
version: "1.0.0",
|
||||
},
|
||||
servers: [
|
||||
{ url: "http://localhost:8080/api", description: "dev" },
|
||||
{ url: "http://localhost:8080", description: "dev" },
|
||||
{ url: "https://dpu.dariusbag.dev/api", description: "prod" },
|
||||
],
|
||||
},
|
||||
@@ -45,7 +45,7 @@ const content = theme.getBuffer(SwaggerThemeNameEnum.ONE_DARK);
|
||||
|
||||
await fastify.register(fastifySwaggerUi, {
|
||||
routePrefix: "/docs",
|
||||
indexPrefix: "/api",
|
||||
indexPrefix: `${Config.env_dev ? "" : "/api"}`,
|
||||
uiConfig: {
|
||||
docExpansion: "list",
|
||||
deepLinking: false,
|
||||
|
||||
Reference in New Issue
Block a user