Add automatic check for DEBUG mode

This commit is contained in:
Gabriel Tofvesson 2022-10-22 07:18:25 +02:00
parent 6efe880528
commit b35ca843ab

View File

@ -134,7 +134,7 @@
</div>
<script>
const DEBUG = true;
const DEBUG = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';
const target = DEBUG ? "http://127.0.0.1:5001/streamchair-psychology/us-central1/" : "https://us-central1-streamchair-psychology.cloudfunctions.net/";
document.addEventListener('DOMContentLoaded', function() {