Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 517 Bytes
const Service = require('./services/service');
const juration = require('juration');
const moment = require('moment');
const defaultConfig = {
service: "twitter",
rate: "1 minute",
host: "aws"
};
class Config {
static parse(opts) {
let config = Object.assign({}, defaultConfig, opts);
config.rate = juration.parse(config.rate) / 60;
config.lastRun = moment().subtract(1, "minutes");
config.credentials = Service.credentials(config.service);
return config;
}
}
module.exports = Config
You can’t perform that action at this time.