You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
2 years ago
|
const path = require('path');
|
||
|
|
||
|
// import .env variables
|
||
|
require('dotenv-safe').load({
|
||
|
path: path.join(__dirname, '../../.env'),
|
||
|
sample: path.join(__dirname, '../../.env.example')
|
||
|
});
|
||
|
|
||
|
module.exports = {
|
||
|
serviceName: 'file_service',
|
||
|
env: process.env.NODE_ENV,
|
||
|
port: process.env.PORT,
|
||
|
logs: process.env.NODE_ENV === 'production' ? 'combined' : 'development',
|
||
|
cdn: {
|
||
|
uri: process.env.NODE_ENV === 'production' ? process.env.CDN_URI : process.env.DEV_CDN_URI
|
||
|
},
|
||
|
postgres: {
|
||
|
uri: process.env.NODE_ENV === 'production' ? process.env.POSTGRES_URI : process.env.POSTGRES_URI_TEST
|
||
|
},
|
||
|
storage: {
|
||
|
uri: process.env.NODE_ENV === 'production' ? process.env.STORAGE_URI : process.env.DEV_STORAGE_URI
|
||
|
},
|
||
|
mongo: {
|
||
|
uri: process.env.NODE_ENV === 'production' ? process.env.MONGO_URI : process.env.MONGO_URI_TEST
|
||
|
},
|
||
|
rabbit: {
|
||
|
uri: process.env.RABBITMQ_URI
|
||
|
},
|
||
|
redis: {
|
||
|
uri: process.env.REDIS_URI
|
||
|
},
|
||
|
otherServices: {
|
||
|
manager: process.env.MANAGER_SERVICE_URL
|
||
|
}
|
||
|
};
|