[App] use current window's hostname for api calls

This commit is contained in:
2020-03-19 13:24:05 +03:00
parent 6b2d4155d4
commit f5aa88fcf9
8 changed files with 2 additions and 1423 deletions

View File

@@ -1,4 +1,4 @@
const root = "http://eggbot.local"; const root = window.location.protocol + "//" + window.location.hostname;
export async function fetchJSON( export async function fetchJSON(
path: string, path: string,

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -16,6 +16,6 @@ monitor_speed = 115200
board_build.f_cpu = 160000000L board_build.f_cpu = 160000000L
upload_resetmethod = nodemcu upload_resetmethod = nodemcu
upload_port=/dev/ttyUSB0 upload_port=COM6
lib_deps = ArduinoJson@6.11 lib_deps = ArduinoJson@6.11