Archived
1
0

Fixed folder name and sql definition file

This commit is contained in:
2022-12-28 17:06:26 -06:00
parent 88b63a3291
commit e639989424
3 changed files with 57 additions and 46 deletions

View File

@@ -2,8 +2,8 @@ const express = require("express");
const bodyParser = require("body-parser");
const cors = require("cors");
const fs = require("fs");
const wol = require("wol")
const mysql = require("mysql")
const wol = require("wol");
const mysql = require("mysql");
var con = mysql.createConnection({
host: "localhost",
@@ -11,6 +11,8 @@ var con = mysql.createConnection({
password: "changeme"
});
//Read bookmarks
try {
var links = require('../src/links.json');
} catch(err) {
@@ -31,6 +33,7 @@ try {
var links = require('../src/links.json');
}
//Read personal data
try {
var personaldata = require('../src/personaldata.json');
} catch(err) {
@@ -43,6 +46,7 @@ try {
var personaldata = require('../src/personaldata.json');
}
//Read app list
if (fs.existsSync('../src/apps.json')) {
console.log("apps.json exists");
}else {
@@ -54,6 +58,7 @@ if (fs.existsSync('../src/apps.json')) {
fs.writeFileSync('../src/apps.json',body);
}
//Read everything else
const providers = require('../src/providers.json');
const themes = require('../src/themes.json');
const messages = require('../src/messages.json');