diff --git a/app/display.html b/app/display.html index 32c8115..8446d80 100644 --- a/app/display.html +++ b/app/display.html @@ -145,7 +145,7 @@ can.style.width = `${window.innerHeight * arg.ratio}px` can.style.height = `${window.innerHeight}px` } else { - can.style.width = `${window.inneWidth}px` + can.style.width = `${window.innerWidth}px` can.style.height = `${window.innerWidth / arg.ratio}px` } } else { @@ -209,7 +209,7 @@ async function onDigital (event, arg) { if (arg.src) { try { - await setImage(arg.src) + await setImage(arg.src) } catch (err) { console.error(err) } diff --git a/app/lib/client/index.js b/app/lib/client/index.js index a52e259..719c9a0 100644 --- a/app/lib/client/index.js +++ b/app/lib/client/index.js @@ -1,6 +1,44 @@ +/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */ +//@ts-ignore +!function (A, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.NoSleep = e() : A.NoSleep = e(); }(this, (function () { return function (A) { var e = {}; function B(g) { if (e[g]) + return e[g].exports; var o = e[g] = { i: g, l: !1, exports: {} }; return A[g].call(o.exports, o, o.exports, B), o.l = !0, o.exports; } return B.m = A, B.c = e, B.d = function (A, e, g) { B.o(A, e) || Object.defineProperty(A, e, { enumerable: !0, get: g }); }, B.r = function (A) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(A, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(A, "__esModule", { value: !0 }); }, B.t = function (A, e) { if (1 & e && (A = B(A)), 8 & e) + return A; if (4 & e && "object" == typeof A && A && A.__esModule) + return A; var g = Object.create(null); if (B.r(g), Object.defineProperty(g, "default", { enumerable: !0, value: A }), 2 & e && "string" != typeof A) + for (var o in A) + B.d(g, o, function (e) { return A[e]; }.bind(null, o)); return g; }, B.n = function (A) { var e = A && A.__esModule ? function () { return A.default; } : function () { return A; }; return B.d(e, "a", e), e; }, B.o = function (A, e) { return Object.prototype.hasOwnProperty.call(A, e); }, B.p = "", B(B.s = 0); }([function (A, e, B) { + "use strict"; + var g = function () { function A(A, e) { for (var B = 0; B < e.length; B++) { + var g = e[B]; + g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(A, g.key, g); + } } return function (e, B, g) { return B && A(e.prototype, B), g && A(e, g), e; }; }(); + var o = B(1), E = o.webm, n = o.mp4, C = function () { return "undefined" != typeof navigator && parseFloat(("" + (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ""])[1]).replace("undefined", "3_2").replace("_", ".").replace("_", "")) < 10 && !window.MSStream; }, Q = function () { return "wakeLock" in navigator; }, i = function () { function A() { var e = this; if (function (A, e) { if (!(A instanceof e)) + throw new TypeError("Cannot call a class as a function"); }(this, A), this.enabled = !1, Q()) { + this._wakeLock = null; + var B = function () { null !== e._wakeLock && "visible" === document.visibilityState && e.enable(); }; + document.addEventListener("visibilitychange", B), document.addEventListener("fullscreenchange", B); + } + else + C() ? this.noSleepTimer = null : (this.noSleepVideo = document.createElement("video"), this.noSleepVideo.setAttribute("title", "No Sleep"), this.noSleepVideo.setAttribute("playsinline", ""), this._addSourceToVideo(this.noSleepVideo, "webm", E), this._addSourceToVideo(this.noSleepVideo, "mp4", n), this.noSleepVideo.addEventListener("loadedmetadata", (function () { e.noSleepVideo.duration <= 1 ? e.noSleepVideo.setAttribute("loop", "") : e.noSleepVideo.addEventListener("timeupdate", (function () { e.noSleepVideo.currentTime > .5 && (e.noSleepVideo.currentTime = Math.random()); })); }))); } return g(A, [{ key: "_addSourceToVideo", value: function (A, e, B) { var g = document.createElement("source"); g.src = B, g.type = "video/" + e, A.appendChild(g); } }, { key: "enable", value: function () { var A = this; return Q() ? navigator.wakeLock.request("screen").then((function (e) { A._wakeLock = e, A.enabled = !0, console.log("Wake Lock active."), A._wakeLock.addEventListener("release", (function () { console.log("Wake Lock released."); })); })).catch((function (e) { throw A.enabled = !1, console.error(e.name + ", " + e.message), e; })) : C() ? (this.disable(), console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "), this.noSleepTimer = window.setInterval((function () { document.hidden || (window.location.href = window.location.href.split("#")[0], window.setTimeout(window.stop, 0)); }), 15e3), this.enabled = !0, Promise.resolve()) : this.noSleepVideo.play().then((function (e) { return A.enabled = !0, e; })).catch((function (e) { throw A.enabled = !1, e; })); } }, { key: "disable", value: function () { Q() ? (this._wakeLock && this._wakeLock.release(), this._wakeLock = null) : C() ? this.noSleepTimer && (console.warn("\n NoSleep now disabled for older iOS devices.\n "), window.clearInterval(this.noSleepTimer), this.noSleepTimer = null) : this.noSleepVideo.pause(), this.enabled = !1; } }, { key: "isEnabled", get: function () { return this.enabled; } }]), A; }(); + A.exports = i; + }, function (A, e, B) { + "use strict"; + A.exports = { webm: "data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrC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AAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw" }; + }]); })); const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); webSocket.onmessage = (event) => { const data = JSON.parse(event.data); console.log(data); }; +function preventSleep() { + //@ts-ignore + var noSleep = new NoSleep(); + document.addEventListener('click', function enableNoSleep() { + document.removeEventListener('click', enableNoSleep, false); + document.getElementById('nosleep').remove(); + noSleep.enable(); + }, false); +} +(function main() { + preventSleep(); +})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/client/index.js.map b/app/lib/client/index.js.map index 47e7ab4..a469822 100644 --- a/app/lib/client/index.js.map +++ b/app/lib/client/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/client/index.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;AAC5D,SAAS,CAAC,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/client/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,YAAY;AACZ,CAAC,UAAS,CAAC,EAAC,CAAC,IAAE,QAAQ,IAAE,OAAO,OAAO,IAAE,QAAQ,IAAE,OAAO,MAAM,CAAA,CAAC,CAAA,MAAM,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAC,CAAA,UAAU,IAAE,OAAO,MAAM,IAAE,MAAM,CAAC,GAAG,CAAA,CAAC,CAAA,MAAM,CAAC,EAAE,EAAC,CAAC,CAAC,CAAA,CAAC,CAAA,QAAQ,IAAE,OAAO,OAAO,CAAA,CAAC,CAAA,OAAO,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAC,CAAA,CAAC,CAAC,OAAO,GAAC,CAAC,EAAE,CAAA,CAAA,CAAC,CAAC,IAAI,EAAC,CAAC,cAAW,OAAO,UAAS,CA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AC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAA;AAED,SAAS,YAAY;IAClB,YAAY;IACZ,IAAI,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,aAAa;QACtD,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;QAC5D,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5C,OAAO,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC,EAAE,KAAK,CAAC,CAAC;AACb,CAAC;AAGD,CAAC,SAAS,IAAI;IACX,YAAY,EAAE,CAAC;AAClB,CAAC,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index e69de29..62d586e 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -0,0 +1,8 @@ +/** + * Delay in an async/await function + * + * @param {integer} ms Milliseconds to delay for + * + * @returns {Promise} Promise to resolve after timeout + **/ +declare function delay(ms: number): Promise; diff --git a/app/lib/proj/index.js.map b/app/lib/proj/index.js.map index d6afd21..71cc387 100644 --- a/app/lib/proj/index.js.map +++ b/app/lib/proj/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proj/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;;AAEjD,2BAA4B;AAE5B,MAAM,SAAS;IAad;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,SAAmB,KAAK;QAfpF,UAAK,GAAS;YACrB,GAAG,EAAG,CAAC;YACP,GAAG,EAAG,IAAI;SACV,CAAC;QACM,YAAO,GAAa,IAAI,CAAC;QAMzB,OAAE,GAAY,WAAW,CAAC;QAMjC,IAAI,CAAC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AAC,CAAA;QACnC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC,CAAA;IAChE,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,MAAgB;IACjG,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AACxD,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/server/index.js b/app/lib/server/index.js index 0b9623d..4c38267 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -1,5 +1,9 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); +const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); const Log = require("log"); class Server { @@ -22,11 +26,16 @@ class Server { } async init() { this.log = await Log({ label: this.id }); + await this.load(); + await this.start(); } async load() { + this.http = express_1.default(); for (let tmpl of this.templates) { tmpl.data = await promises_1.readFile(tmpl.path, 'utf8'); } + this.http.get('/', this.index.bind(this)); + this.http.get('/client.js', this.script.bind(this)); this.log.info("Server assets loaded"); } template(name, data) { @@ -36,24 +45,37 @@ class Server { } return html; } - start() { - this.http.listen(function () { - this.isActive = true; - this.log.inf(`Server started!`); - this.log.info(`URL [ http://localhost:${this.port} ]`); + async start() { + return new Promise(function (resolve, reject) { + this.httpd = this.http.listen(this.port, function () { + this.isActive = true; + this.log.info(`Server started!`); + this.log.info(`URL [ http://localhost:${this.port} ]`); + return resolve(true); + }.bind(this)); }.bind(this)); } stop() { - this.http.close(); - this.isActive = false; - this.log.info(`Server stopped :(`); + return new Promise(function (resolve, reject) { + return this.httpd.close(function () { + this.isActive = false; + this.log.info(`Server stopped :(`); + }.bind(this)); + }.bind(this)); } index(req, res, next) { const html = this.template('index', { PORT: `${this.port}` }); + this.log.info('GET /'); return res.send(html); } script(req, res, next) { const js = this.template('script', { PORT: `${this.wsPort}` }); + res.contentType('text/javascript'); + this.log.info('GET /script.js'); + return res.send(js); } } +module.exports = function () { + return new Server(); +}; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index ffea84e..c2fc08d 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;AAGA,0CAAsC;AACtC,2BAA4B;AAa5B,MAAM,MAAM;IAiBX;QAhBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAEO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QAE7B,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,IAAI;QACT,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,MAAM,mBAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SAC7C;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IACtC,CAAC;IAED,QAAQ,CAAE,IAAY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AAC,CAAC,CAAA;QACd,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAEd,CAAC;IAED,KAAK,CAAE,GAAa,EAAE,GAAc,EAAE,IAAe;QACpD,MAAM,IAAI,GAAY,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,IAAI,EAAG,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACvE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACtB,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,MAAM,CAAE,GAAa,EAAE,GAAc,EAAE,IAAe;QACrD,MAAM,EAAE,GAAY,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAG,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QACxE,GAAG,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAA;QAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC/B,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACpB,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/main.js b/app/main.js index e08be3c..45726ef 100644 --- a/app/main.js +++ b/app/main.js @@ -39,6 +39,7 @@ let cmd; let seq; let capper; let alert; +let server; const cfg = require('./data/cfg.json') @@ -136,6 +137,7 @@ var init = async function () { cmd = require('cmd')(cfg, proj, cam, light, alert, cam2, proj2, capper) seq = require('sequencer')(cfg, cmd, mainWindow.webContents) + server = require('server')() } app.on('ready', init) diff --git a/app/package-lock.json b/app/package-lock.json index 1ec12ef..d18b6a6 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.7", + "version": "1.7.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 52dd2ac..3e2c7b6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.7", + "version": "1.7.8", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index de49d0d..e19df65 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.8", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 64c9e7c..943fdc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index b617ac9..c396ded 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index de49d0d..e19df65 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.8", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/proj/index.ts b/src/proj/index.ts index 5b29ca2..641343a 100644 --- a/src/proj/index.ts +++ b/src/proj/index.ts @@ -155,7 +155,7 @@ class Projector { } message += ' 1 frame' } else if (cmd === this.cfg.arduino.cmd.projectors) { - message += 'Projectors both MOVED 1 frame each'; + message += 'Projectors both MOVED 1 frame each' } message += ` ${ms}ms` this.log.info(message, 'PROJECTOR') @@ -164,5 +164,5 @@ class Projector { } module.exports = function (arduino : Arduino, cfg : any, ui : any, filmout : any, second : boolean) { - return new Projector(arduino, cfg, ui, filmout, second); + return new Projector(arduino, cfg, ui, filmout, second) } \ No newline at end of file diff --git a/src/server/index.ts b/src/server/index.ts index 0b04164..0e8ea4b 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,6 +1,5 @@ import * as WebSocket from 'ws' -import express from 'express' -import type { Request, Response } from 'express' +import express, { Express, Request, Response, Application } from 'express' import { readFile } from 'fs/promises' import Log = require('log'); @@ -29,21 +28,31 @@ class Server { path : 'lib/client/index.js' } ] - private http : any + private http : Application + private httpd : Server private port : number = 9900 private wsPort : number = 9901 + constructor () { this.init() + } async init () { this.log = await Log({ label : this.id }); + await this.load() + await this.start() } async load () { + this.http = express() for (let tmpl of this.templates) { tmpl.data = await readFile(tmpl.path, 'utf8') } + + this.http.get('/', this.index.bind(this)) + this.http.get('/client.js', this.script.bind(this)) + this.log.info("Server assets loaded") } @@ -55,25 +64,40 @@ class Server { return html } - start () { - this.http.listen(function () { - this.isActive = true - this.log.inf(`Server started!`) - this.log.info(`URL [ http://localhost:${this.port} ]`) + async start () { + return new Promise(function (resolve : Function, reject : Function) { + this.httpd = this.http.listen(this.port, function () { + this.isActive = true + this.log.info(`Server started!`) + this.log.info(`URL [ http://localhost:${this.port} ]`) + return resolve(true) + }.bind(this)) }.bind(this)) } stop() { - this.http.close() - this.isActive = false - this.log.info(`Server stopped :(`) + return new Promise(function (resolve : Function, reject : Function) { + return this.httpd.close(function () { + this.isActive = false + this.log.info(`Server stopped :(`) + }.bind(this)) + }.bind(this)) + } index (req : Request, res : Response, next : Function) { const html : string = this.template('index', { PORT : `${this.port}` }) + this.log.info('GET /') return res.send(html) } script (req : Request, res : Response, next : Function) { const js : string = this.template('script', { PORT : `${this.wsPort}` }) + res.contentType('text/javascript') + this.log.info('GET /script.js') + return res.send(js) } +} + +module.exports = function () { + return new Server() } \ No newline at end of file