fix local development
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
API_KEY=apiKey
|
API_KEY=apiKey
|
||||||
PORT=
|
PORT=
|
||||||
|
ENV_DEV=true
|
||||||
|
|
||||||
TIDAL_HOST=http://localhost
|
TIDAL_HOST=http://localhost
|
||||||
TIDAL_PORT=47836
|
TIDAL_PORT=47836
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -25,8 +25,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@dpu/shared": {
|
"node_modules/@dpu/shared": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.4",
|
||||||
"resolved": "git+https://git.dariusbag.dev/DarDarBinks/dpu-shared.git#953afcbc84cafbe9a2db3024c0192e64011ce53a",
|
"resolved": "git+https://git.dariusbag.dev/DarDarBinks/dpu-shared.git#6574f8f67220794042e06b3801657f08c7cbe4db",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"chalk": "^5.6.2",
|
"chalk": "^5.6.2",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ dotenv.config();
|
|||||||
export const Config = {
|
export const Config = {
|
||||||
api_key: process.env.API_KEY,
|
api_key: process.env.API_KEY,
|
||||||
port: process.env.PORT || "8080",
|
port: process.env.PORT || "8080",
|
||||||
|
env_dev: process.env.ENV_DEV || false,
|
||||||
|
|
||||||
tidal: {
|
tidal: {
|
||||||
host: process.env.TIDAL_HOST || "",
|
host: process.env.TIDAL_HOST || "",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ await fastify.register(fastifySwagger, {
|
|||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
},
|
},
|
||||||
servers: [
|
servers: [
|
||||||
{ url: "http://localhost:8080/api", description: "dev" },
|
{ url: "http://localhost:8080", description: "dev" },
|
||||||
{ url: "https://dpu.dariusbag.dev/api", description: "prod" },
|
{ url: "https://dpu.dariusbag.dev/api", description: "prod" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -45,7 +45,7 @@ const content = theme.getBuffer(SwaggerThemeNameEnum.ONE_DARK);
|
|||||||
|
|
||||||
await fastify.register(fastifySwaggerUi, {
|
await fastify.register(fastifySwaggerUi, {
|
||||||
routePrefix: "/docs",
|
routePrefix: "/docs",
|
||||||
indexPrefix: "/api",
|
indexPrefix: `${Config.env_dev ? "" : "/api"}`,
|
||||||
uiConfig: {
|
uiConfig: {
|
||||||
docExpansion: "list",
|
docExpansion: "list",
|
||||||
deepLinking: false,
|
deepLinking: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user