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