const development = {
    database: 'mongodb://mongo:27017/DEVsessionDB',
    kafka_server: 'kafka:9092',
    rabbitmq: 'rabbitmq',
    port: 5006,
    host: "session",
    website: {
        host: "website",
        port: 5005
    },
    model: {
        host: "model",
        port: 5007
    },
    model: {
        host: "constraint",
        port: 5010
    }
}

const github = {
    database: 'mongodb://mongo:27017/DEVsessionDB',
    kafka_server: 'kafka:9092',
    rabbitmq: 'rabbitmq',
    port: 5006,
    host: "session",
    website: {
        host: "website",
        port: 5005
    },
    model: {
        host: "model",
        port: 5007
    },
    model: {
        host: "constraint",
        port: 5010
    }
}


const production = {
    database: 'mongodb://mongo:27017/sessionDB',
    kafka_server: 'kafka:9092',
    rabbitmq: 'rabbitmq',
    port: 5006,
    host: "session",
    website: {
        host: "website",
        port: 5005
    },
    model: {
        host: "model",
        port: 5007
    },
    model: {
        host: "constraint",
        port: 5010
    }
}

let config;
switch(process.env.NODE_ENV) {
    case 'production':
        config = production
        break;
    case 'development': 
        config = development
        break;
    case 'github': 
        config = github
        break;
    default: 
        config = development
}
module.exports = config
