Update branch

Merge branch 'master' of github.com:strapi/strapi into add-overlay-blocker
This commit is contained in:
cyril lopez 2018-01-17 13:00:00 +01:00
commit 289f75aa98
4 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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();

View File

@ -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) => {