Skip to content

Commit

Permalink
fix: calculate paths based on rootDir instead of process.cwd()
Browse files Browse the repository at this point in the history
  • Loading branch information
weyoss committed May 17, 2024
1 parent f2e021f commit 6f89c98
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ import { getDirname } from 'redis-smq-common';

const curDir = getDirname();
const srcDir = resolve(curDir, '../');
const rootDir =
resolve(srcDir, '../').split('/').pop() === 'redis-smq-rest-api'
? resolve(srcDir, '../')
: resolve(srcDir, '../../..');
const tsConfigPath = resolve(rootDir, './tsconfig.json');
const jsonSchemaPath = resolve(rootDir, './dist/schema.json');
const openApiDocumentFilename = 'openapi-specs.json';
const tsConfigPath = resolve(process.cwd(), './tsconfig.json');
const jsonSchemaPath = resolve(process.cwd(), './dist/schema.json');
const apiServerPort = 7210;
const apiServerHostname = '127.0.0.1';
const apiServerBasePath = '/';

export const constants = {
srcDir,
rootDir,
openApiDocumentFilename,
tsConfigPath,
jsonSchemaPath,
Expand Down

0 comments on commit 6f89c98

Please sign in to comment.