@monodog/backend 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,7 +50,7 @@ function loadConfig() {
50
50
  // 1. Determine the path to the config file
51
51
  // We assume the backend package is running from the monorepo root (cwd is root)
52
52
  // or that we can navigate up to the root from the current file's location.
53
- const rootPath = path.resolve('../../'); // Adjust based on your workspace folder depth from root if needed
53
+ const rootPath = path.resolve(process.cwd()); // Adjust based on your workspace folder depth from root if needed
54
54
  const configPath = path.resolve(rootPath, 'monodog-conf.json');
55
55
  if (!fs.existsSync(configPath)) {
56
56
  console.error(`ERROR: Configuration file not found at ${configPath}`);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config_loader_1 = require("./config-loader");
4
+ function generateUrl() {
5
+ const appConfig = (0, config_loader_1.loadConfig)();
6
+ const DATABASE_URL = `${appConfig.database.path}`;
7
+ process.env.DATABASE_URL = DATABASE_URL;
8
+ process.env.DATABASE_PORT = `${appConfig.database.port}`;
9
+ process.stdout.write(DATABASE_URL);
10
+ }
11
+ generateUrl();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monodog/backend",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "Backend API server for monodog monorepo dashboard",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@ export function loadConfig(): MonodogConfig {
35
35
  // 1. Determine the path to the config file
36
36
  // We assume the backend package is running from the monorepo root (cwd is root)
37
37
  // or that we can navigate up to the root from the current file's location.
38
- const rootPath = path.resolve('../../'); // Adjust based on your workspace folder depth from root if needed
38
+ const rootPath = path.resolve(process.cwd()); // Adjust based on your workspace folder depth from root if needed
39
39
  const configPath = path.resolve(rootPath, 'monodog-conf.json');
40
40
 
41
41
  if (!fs.existsSync(configPath)) {
@@ -1,4 +1,4 @@
1
- import { loadConfig } from './src/config-loader';
1
+ import { loadConfig } from './config-loader';
2
2
 
3
3
  function generateUrl() {
4
4
  const appConfig = loadConfig();