spee.ch/config/siteConfig.js

44 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-03-09 18:30:06 -08:00
function SiteConfig () {
this.analytics = {
googleId: 'default',
2018-03-09 18:30:06 -08:00
};
this.assetDefaults = {
description: 'An asset published on Spee.ch',
thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',
title : 'A Spee.ch Implementation',
2018-03-09 18:30:06 -08:00
};
2018-03-12 19:26:03 -07:00
this.auth = {
sessionKey: 'default',
2018-03-09 18:30:06 -08:00
};
2018-03-12 19:26:03 -07:00
this.details = {
description: 'Welcome to my decentralized image and video sharing site.',
host : 'http://localhost:3000',
2018-03-13 15:37:42 -07:00
port : 3000,
title : 'My Spee.ch Site',
twitter : '@exampleTwitterHandle',
2018-03-12 19:26:03 -07:00
};
this.publishing = {
additionalClaimAddresses: [],
2018-03-12 19:26:03 -07:00
disabled : false,
disabledMessage : 'Please check back soon.',
2018-03-12 19:26:03 -07:00
primaryClaimAddress : 'default',
thumbnailChannel : 'default',
thumbnailChannelId : 'default',
uploadDirectory : '/home/lbry/Uploads',
};
2018-03-29 12:46:20 -07:00
this.update = (config) => {
2018-03-12 19:26:03 -07:00
if (!config) {
2018-03-29 13:39:04 -07:00
return console.log('No site config received.');
2018-03-12 19:26:03 -07:00
}
2018-05-02 10:30:33 -07:00
const { analytics, assetDefaults, auth, details, publishing } = config;
2018-03-29 13:39:04 -07:00
console.log('Configuring site details...');
2018-03-12 19:26:03 -07:00
this.analytics = analytics;
this.assetDefaults = assetDefaults;
this.auth = auth;
this.details = details;
this.publishing = publishing;
2018-03-09 18:30:06 -08:00
};
2018-04-17 12:57:53 -07:00
}
2018-03-09 18:30:06 -08:00
module.exports = new SiteConfig();