mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 14:22:07 +03:00
9b309cf4e7
refs https://github.com/TryGhost/Toolbox/issues/127 - This refactor is needed to accomodate incoming "resource cache" which shares a lot of common logic with how url cache is operated
13 lines
510 B
JavaScript
13 lines
510 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 urlsCachePath = path.join(config.getContentPath('data'), 'urls.json');
|
|
const urlService = new UrlService({urlsCachePath});
|
|
|
|
// Singleton
|
|
module.exports = urlService;
|