Created
October 10, 2019 15:34
-
-
Save ramazankanbur/54b63c16cbd4afcabf34e5c014e62878 to your computer and use it in GitHub Desktop.
sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mongoose = require('mongoose'); | |
var projectConfig = { | |
coreConfig: { | |
'mongoDb': 'mongodb://localhost:27017/meanAppDb', | |
'secretKey': 'meanstackapplication', | |
'port': process.env.PORT || 4000, | |
}, | |
connectMongoDb: () => { | |
mongoose.Promise = global.Promise; | |
mongoose.connect(projectConfig.coreConfig.mongoDb, (err) => { | |
if (err) console.error(`database bağlantısı esnasında hata oluştu ${err.message}`); | |
}).then(() => { | |
console.log(`${projectConfig.coreConfig.mongoDb} adresine mongoDb bağlantısı başarılı`); | |
}); | |
}, | |
connectMsSqlDb: () => { | |
} | |
} | |
module.exports = projectConfig; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment