2021-11-11 15:48:36 +03:00
|
|
|
const path = require('path');
|
|
|
|
const config = require('../../../shared/config');
|
2020-04-29 18:44:27 +03:00
|
|
|
const UrlService = require('./UrlService');
|
2021-11-11 15:48:36 +03:00
|
|
|
|
|
|
|
// 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});
|
2017-12-11 18:56:04 +03:00
|
|
|
|
|
|
|
// Singleton
|
|
|
|
module.exports = urlService;
|