treesummaryrefslogcommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/index.js b/index.js
index e9169ae..250ab98 100644
--- a/index.js
+++ b/index.js
@@ -1,24 +1,16 @@
-const mongo = require("mongodb");
const express = require("express")
const fs = require("fs")
-const mustache = require("mustache")
const app = express()
const port = 3000
app.get("/", (req, res) => {
fs.readFile("index.html", (err, data) => {
- res.send(mustache.render("" + data, {
- reload_url: process.env.BROWSER_REFRESH_URL,
- }));
+ res.sendFile(__dirname + "/html/index.html");
});
});
-app.get("/script.js", (req, res) => res.sendFile(__dirname + "/script.js"))
+app.get("/script.js", (req, res) => res.sendFile(__dirname + "/html/script.js"))
app.listen(port, () => {
console.log("Listening on port %d", port)
- console.log(process.env.BROWSER_REFRESH_URL.replace("localhost", "192.168.178.48"));
- if (process.send) {
- process.send("online");
- }
});