Skip to content

Commit

Permalink
adjusted paths
Browse files Browse the repository at this point in the history
  • Loading branch information
taeguscromis committed Feb 28, 2024
1 parent bb502ca commit a8f6c62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions units/apiServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ export function createServer(config, nodeDirectory, onDataCallback) {
});

app.get("/index.html", (req, res) => {
res.sendFile(path.resolve('html/index.html'));
res.sendFile(path.resolve('./html/index.html'));
});

app.get("/dashboard.html", (req, res) => {
res.sendFile(path.resolve('html/dashboard.html'));
res.sendFile(path.resolve('./html/dashboard.html'));
});

app.get("/daemonLog.html", (req, res) => {
res.sendFile(path.resolve('html/daemonLog.html'));
res.sendFile(path.resolve('./html/daemonLog.html'));
});

app.get("/peers.html", (req, res) => {
res.sendFile(path.resolve('html/peers.html'));
res.sendFile(path.resolve('./html/peers.html'));
});

app.get("*", (req, res) => {
if (path.extname(req.path) !== '.map') {
var pathName = safeResolve('html' + req.path);
var pathName = safeResolve('./html' + req.path);

if (fs.existsSync(pathName)) {
res.sendFile(pathName);
Expand Down

0 comments on commit a8f6c62

Please sign in to comment.