forked from snxraven/LinkUp-P2P-Chat
And I honestly have no idea why it doesnt want to work
This commit is contained in:
parent
13e4020920
commit
f5f8d0ce19
3
app.js
3
app.js
@ -432,6 +432,9 @@ function writeConfigToFile(filePath) {
|
|||||||
async function readConfigFromFile(filePath) {
|
async function readConfigFromFile(filePath) {
|
||||||
await fs.readFile(filePath, 'utf8', (err, data) => {
|
await fs.readFile(filePath, 'utf8', (err, data) => {
|
||||||
if(err) return console.log("Error while reading config.json! ", err);
|
if(err) return console.log("Error while reading config.json! ", err);
|
||||||
|
console.log("1:", data);
|
||||||
|
data = JSON.parse(data);
|
||||||
|
console.log("2:", data);
|
||||||
config.userName = data.userName;
|
config.userName = data.userName;
|
||||||
config.userAvatar = data.userAvatar;
|
config.userAvatar = data.userAvatar;
|
||||||
config.rooms = data.rooms;
|
config.rooms = data.rooms;
|
||||||
|
Loading…
Reference in New Issue
Block a user