Rewrite page in Svelte 5 #49

Merged
Neshura merged 94 commits from rewrite/svelte into main 2024-01-06 14:12:09 +00:00
Showing only changes of commit 84f45fa16a - Show all commits

View file

@ -5,9 +5,12 @@ export async function load() {
const credFile = './credentials.json';
const socket = io('https://status.neshweb.net/');
let credentials: { username: string; password: string };
let credentials = {
username: '',
password: ''
};
if (fs.existsSync(credFile)) {
let buf = fs.readFileSync(credFile);
const buf = fs.readFileSync(credFile);
credentials = JSON.parse(buf.toString());
} else {
console.error('Credentials File does not exist, Socket.io connection will not work.');