Ghost/core/server/web/site/routes.js
Hannah Wolfe e7b80e50dc
Refactored bootstrap.init to require route settings
- The router bootstrap is no longer allowed to fetch it's own settings, but rather is passed them
- This moves the call to the site routes.js file, which isn't much better but it's a start
- The goal is to always pass these in from the boot process, or from the bridge reloader
2021-07-07 10:25:45 +01:00

10 lines
386 B
JavaScript

const debug = require('@tryghost/debug')('routing');
const routing = require('../../../frontend/services/routing');
const frontendSettings = require('../../../frontend/services/settings');
module.exports = function siteRoutes(options = {}) {
debug('site Routes', options);
options.routerSettings = frontendSettings.get('routes');
return routing.bootstrap.init(options);
};