mirror of
https://github.com/owncast/owncast.git
synced 2024-12-21 00:35:47 +03:00
16 lines
No EOL
426 B
JavaScript
16 lines
No EOL
426 B
JavaScript
// add more to the promises later.
|
|
class Config {
|
|
async init() {
|
|
const configFileLocation = "https://goth.land/config";
|
|
|
|
try {
|
|
const response = await fetch(configFileLocation);
|
|
const configData = await response.json();
|
|
Object.assign(this, configData);
|
|
return this;
|
|
} catch(error) {
|
|
console.log(error);
|
|
// No config file present. That's ok. It's not required.
|
|
}
|
|
}
|
|
} |