mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 23:57:32 +00:00
Update branch
Merge branch 'master' of github.com:strapi/strapi into add-overlay-blocker
This commit is contained in:
commit
289f75aa98
@ -10,8 +10,8 @@ const logger = require('strapi-utils').logger;
|
||||
module.exports = (scope, success, error) => {
|
||||
const knex = require(path.resolve(`${scope.rootPath}/node_modules/knex`))({
|
||||
client: scope.client.module,
|
||||
connection: Object.assign(scope.database, {
|
||||
user: scope.database.username
|
||||
connection: Object.assign(scope.database.settings, {
|
||||
user: scope.database.settings.username
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -10,7 +10,7 @@ const logger = require('strapi-utils').logger;
|
||||
module.exports = (scope, success, error) => {
|
||||
const Mongoose = require(path.resolve(`${scope.rootPath}/node_modules/mongoose`));
|
||||
|
||||
Mongoose.connect(`mongodb://${ (scope.database.username && scope.database.password) ? `${scope.database.username}:${scope.database.password}@` : '' }${scope.database.host}:${scope.database.port}/${scope.database.database}`, function (err) {
|
||||
Mongoose.connect(`mongodb://${ (scope.database.settings.username && scope.database.settings.password) ? `${scope.database.settings.username}:${scope.database.settings.password}@` : '' }${scope.database.settings.host}:${scope.database.settings.port}/${scope.database.settings.database}`, function (err) {
|
||||
if (err) {
|
||||
logger.warn('Database connection has failed! Make sure your database is running.');
|
||||
return error();
|
||||
|
||||
@ -10,10 +10,10 @@ const logger = require('strapi-utils').logger;
|
||||
module.exports = (scope, success, error) => {
|
||||
const Redis = require(`${scope.rootPath}/node_modules/ioredis`);
|
||||
const redis = new Redis({
|
||||
port: scope.database.port,
|
||||
host: scope.database.host,
|
||||
password: scope.database.password,
|
||||
db: scope.database.database
|
||||
port: scope.database.settings.port,
|
||||
host: scope.database.settings.host,
|
||||
password: scope.database.settings.password,
|
||||
db: scope.database.settings.database
|
||||
});
|
||||
|
||||
redis.connect((err) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user