diff --git a/apidocs/dev/webapp.md b/apidocs/dev/webapp.md index 1e4fe2a5..4dd54621 100644 --- a/apidocs/dev/webapp.md +++ b/apidocs/dev/webapp.md @@ -24,7 +24,7 @@ When developing it is useful to use the development server so Vue changes happen The development server is accessed on a different port from the microscope API. When Vite starts, it creates a proxy that proxies all routes starting with `/api` to `http://localhost:5000/api`. This is useful when using either the simulation server or when developing directly on a microscope. -If developing on a different computer you can run: +If developing the webapp on a different computer you can run: npm run serve:microscope @@ -32,11 +32,11 @@ This will proxy all routes starting with `/api` to `http://microscope.local:5000 If your microscope hostname is not `microscope`, you can use local environment files to override this route. Create the file `.env.local` within the `/webapp/` directory, and in that file add the line - VITE_MICROSCPOPE_HOST=http://myhostname.local:5000 + VITE_MICROSCOPE_HOST=http://myhostname.local:5000 (changing `myhostname` to the correct host name.) -**Note:** If you have performance issues with lag this can depend on mdns speed for your setup. To avoid mdns overload `VITE_MICROSCPOPE_HOST` with the IP address rather than the host name. +**Note:** If you have performance issues with lag, this can be caused by mDNS speed for your setup. To avoid mDNS, overload `VITE_MICROSCOPE_HOST` with the IP address of your microscope, rather than the host name. # Javascript: Formatting and linting diff --git a/webapp/vite.config.mjs b/webapp/vite.config.mjs index 6f6410a4..a6965fd8 100644 --- a/webapp/vite.config.mjs +++ b/webapp/vite.config.mjs @@ -17,7 +17,7 @@ export default defineConfig(({ command, mode }) => { if (env.VITE_API_TARGET === "local") { target = "http://localhost:5000"; } else if (env.VITE_API_TARGET === "microscope") { - target = env.VITE_MICROSCPOPE_HOST || "http://microscope.local:5000"; + target = env.VITE_MICROSCOPE_HOST || "http://microscope.local:5000"; } else { throw new Error(`Invalid VITE_API_TARGET: ${env.VITE_API_TARGET}`); }