Lightweight node app to use in place of plex to self host your video and movie collections. Running on just under 50MB of ram this is ideal for people looking to host videos on minimal hardware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
746 B

const fileIO = require('./fileIO');
const CONFIG_FILE_NAME = "conf.json";
const config = fileIO.getFileAsJSON(CONFIG_FILE_NAME);
module.exports=
{
getConfiguration: function()
{
return config;
},
syncToDisk: function()
{
fileIO.writeJSONToFile(CONFIG_FILE_NAME, config);
},
updateSystem: function(host, publicDir, privateDir)
{
process.env.SERVER_URL = host;
process.env.PRIVATE_DIR = privateDir;
process.env.PUBLIC_DIR = publicDir;
fileIO.syncEnv();
},
getUserCount: function()
{
return (config.hasOwnProperty('users')) ? config.users.length : 0;
}
};