mirror of
https://github.com/strapi/strapi.git
synced 2025-08-28 10:45:51 +00:00
Fix path to retrieve defaults settings and remove useless files
This commit is contained in:
parent
8e55bd14a2
commit
937a4839bd
@ -38,7 +38,7 @@ module.exports = function (strapi) {
|
|||||||
initialize: cb => {
|
initialize: cb => {
|
||||||
// Force cache mode in production
|
// Force cache mode in production
|
||||||
if (strapi.config.environment === 'production') {
|
if (strapi.config.environment === 'production') {
|
||||||
strapi.config.hook.ejs.cache = true;
|
strapi.config.hook.settings.ejs.cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
render(strapi.app, strapi.config.hook.settings.ejs);
|
render(strapi.app, strapi.config.hook.settings.ejs);
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/**
|
|
||||||
* NotFoundPage
|
|
||||||
*
|
|
||||||
* This is the page we show when the user visits a url that doesn't have a route
|
|
||||||
*
|
|
||||||
* NOTE: while this component should technically be a stateless functional
|
|
||||||
* component (SFC), hot reloading does not currently support SFCs. If hot
|
|
||||||
* reloading is not a neccessity for you then you can refactor it and remove
|
|
||||||
* the linting exception.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import messages from './messages';
|
|
||||||
|
|
||||||
export default class NotFound extends React.Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div className="container">
|
|
||||||
<h1>
|
|
||||||
<FormattedMessage {...messages.pageNotFound} />
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
/**
|
|
||||||
* NotFoundPage
|
|
||||||
*
|
|
||||||
* This is the page we show when the user visits a url that doesn't have a route
|
|
||||||
*
|
|
||||||
* NOTE: while this component should technically be a stateless functional
|
|
||||||
* component (SFC), hot reloading does not currently support SFCs. If hot
|
|
||||||
* reloading is not a neccessity for you then you can refactor it and remove
|
|
||||||
* the linting exception.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import messages from './messages';
|
|
||||||
|
|
||||||
export default class NotFound extends React.Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div className="container">
|
|
||||||
<h1>
|
|
||||||
<FormattedMessage {...messages.pageNotFound} />
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -46,7 +46,7 @@ module.exports = function (strapi) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_.forEach(_.pickBy(strapi.config.connections, {connector: 'strapi-mongoose'}), (connection, connectionName) => {
|
_.forEach(_.pickBy(strapi.config.connections, {connector: 'strapi-mongoose'}), (connection, connectionName) => {
|
||||||
const {host, port, username, password, database} = _.defaults(connection.settings, strapi.config.hook.settings);
|
const {host, port, username, password, database} = _.defaults(connection.settings, strapi.config.hook.settings.mongoose);
|
||||||
|
|
||||||
// Connect to mongo database
|
// Connect to mongo database
|
||||||
if (_.isEmpty(username) || _.isEmpty(password)) {
|
if (_.isEmpty(username) || _.isEmpty(password)) {
|
||||||
|
@ -51,7 +51,7 @@ module.exports = function(strapi) {
|
|||||||
// For each connection in the config register a new Knex connection.
|
// For each connection in the config register a new Knex connection.
|
||||||
_.forEach(connections, (connection, name) => {
|
_.forEach(connections, (connection, name) => {
|
||||||
// Apply defaults
|
// Apply defaults
|
||||||
_.defaults(connection.settings, strapi.hook.redis.defaults);
|
_.defaults(connection.settings, strapi.config.hook.settings.redis);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const redis = new Redis(_.defaultsDeep({
|
const redis = new Redis(_.defaultsDeep({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user