forked from snxraven/LinkUp-P2P-Chat
It actually works now but i want to get it to work properly
This commit is contained in:
parent
f5f8d0ce19
commit
f6f804ab39
8
app.js
8
app.js
@ -431,13 +431,9 @@ function writeConfigToFile(filePath) {
|
||||
|
||||
async function readConfigFromFile(filePath) {
|
||||
await fs.readFile(filePath, 'utf8', (err, data) => {
|
||||
if(err) return console.log("Error while reading config.json! ", err);
|
||||
console.log("1:", data);
|
||||
if(err) return console.log("Error while reading config.json! ", err)
|
||||
data = JSON.parse(data);
|
||||
console.log("2:", data);
|
||||
config.userName = data.userName;
|
||||
config.userAvatar = data.userAvatar;
|
||||
config.rooms = data.rooms;
|
||||
config = data;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user