centrelize the configuration folder
This commit is contained in:
4
config/config.yaml
Normal file
4
config/config.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
database:
|
||||||
|
host: 'localhost'
|
||||||
|
port: 27017
|
||||||
|
name: 'aman'
|
||||||
@@ -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>;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user