mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
4582fd48b5
refs https://github.com/TryGhost/Toolbox/issues/116 - This should allow testing in a bit easier manner and would place the file into a more suitable directory - ideally we'd put an alfa flag bahind this new "cached routes" feature to have less consequences to deal with if we have to back out
13 lines
508 B
JavaScript
13 lines
508 B
JavaScript
const path = require('path');
|
|
const config = require('../../../shared/config');
|
|
const UrlService = require('./UrlService');
|
|
|
|
// NOTE: instead of a path we could give UrlService a "data-resolver" of some sort
|
|
// so it doesn't have to contain the logic to read data at all. This would be
|
|
// a possible improvement in the future
|
|
const urlCachePath = path.join(config.getContentPath('data'), 'urls.json');
|
|
const urlService = new UrlService({urlCachePath});
|
|
|
|
// Singleton
|
|
module.exports = urlService;
|