From 7f1a6d51b2593cc95c39b4034362b420a0bd42d5 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 19 Dec 2022 13:07:36 -0500 Subject: [PATCH] Add foundation for web portal --- websvr.js | 20 ++++++++++++++++++++ www/index.html | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 websvr.js create mode 100644 www/index.html diff --git a/websvr.js b/websvr.js new file mode 100644 index 0000000..d5ca6ca --- /dev/null +++ b/websvr.js @@ -0,0 +1,20 @@ +/* Pellet Stove Control Panel + * Web Configuration Server + * v0.0.0 by Skylar Grant + */ + +const http = require('http'); +const host = 'localhost'; +const port = 8080; +const config = require('./config.json'); + +const requestListener = (req, res) => { + res.writeHead(200); + res.end('PSControlPanel Web Server') +}; + +const server = http.createServer(requestListener); + +server.listen(port, host, () => { + if (config.debugMode) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: Started web config portal.`); +}) \ No newline at end of file diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000..207d913 --- /dev/null +++ b/www/index.html @@ -0,0 +1,23 @@ + + + + Pellet Stove Web Portal + + +
Pellet Stove Web Portal
+
Auger: Off | Igniter: Off | Combustion Blower: Off
+
Vacuum: Open | Proof of Fire: Open
+
+
+ +
+ + ms
+ ms
+ ms
+
+ + +
+ + \ No newline at end of file