centrelize the configuration folder

This commit is contained in:
Sven Czarnian
2022-10-22 16:11:17 +02:00
parent dfa037cf9d
commit a7fd89b7c2
2 changed files with 5 additions and 1 deletions

4
config/config.yaml Normal file
View File

@@ -0,0 +1,4 @@
database:
host: 'localhost'
port: 27017
name: 'aman'

View File

@@ -4,6 +4,6 @@ import { join } from 'path';
export default () => { export default () => {
return yaml.load( return yaml.load(
readFileSync(join(__dirname, 'config.yaml'), 'utf8'), readFileSync(join(process.cwd(), 'config/config.yaml'), 'utf8'),
) as Record<string, any>; ) as Record<string, any>;
}; };