Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-06-12 10:50:06 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-06-12 10:50:06 -0700
commit16fc0bf7938071b400364d705f9ac859068be5f3 (patch)
tree94c16f2c477dbf1d6e2b4e9e11403f1f5f01fc68 /src
parent333931c82cd3c9aee6d09319a273c9735a0fdca8 (diff)
WIP: modify dev server to use as test server, also
Diffstat (limited to 'src')
-rw-r--r--src/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index b562651..ee9cea9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -7,6 +7,12 @@ import { scenarios } from './modules/scenarios.js';
globalThis.svgns = 'http://www.w3.org/2000/svg';
+if (window.IS_DEV) {
+ const source = new EventSource('/esbuild');
+ source.addEventListener('change', () => location.reload());
+ // source.addEventListener('message', (e) => console.log(e));
+}
+
const mapPlaceholder = document.querySelector('.map-placeholder'),
distanceOutput = document.getElementById('status'),
proneToggle = document.getElementById('toggle-prone-counter'),