Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-kt committed Mar 13, 2021
1 parent 6513526 commit cb057e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Scriptable/widget.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// © 2021 Nils Kleinert

const backend = "http://192.168.178.77:3000"
const background = "1d1f2f" // HEX

//// -- DON'T TOUCH ANY CODE HERE

Expand Down Expand Up @@ -84,7 +85,7 @@ function printUptime(seconds) {
}

let widget = await createWidget()
widget.backgroundColor = new Color("1d1f2f")
widget.backgroundColor = new Color(background, 1)
if (!config.runsInWidget) {
await widget.presentMedium()
}
Expand Down
6 changes: 3 additions & 3 deletions Server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const config = require("./config.json"),
proxmox = require("proxmox-client"),
express = require("express"),
app = express(),
fs = require('fs');
fs = require("fs");

proxmox.auth(config.proxmox.hostname, config.proxmox.user, config.proxmox.token).then(() => {

Expand Down Expand Up @@ -48,12 +48,12 @@ proxmox.auth(config.proxmox.hostname, config.proxmox.user, config.proxmox.token)
});
}

app.get('/', (req, res) => {
app.get("/", (req, res) => {
res.set("Content-Type", "application/json");
res.send(JSON.stringify(allServers));
})

app.get('/scriptable', (req, res) => {
app.get("/scriptable", (req, res) => {
fs.readFile("../Scriptable/widget.js", "utf8", function (err, data) {
if (err) throw err;
res.set("Content-Type", "text/plain");
Expand Down

0 comments on commit cb057e9

Please sign in to comment.