Apply suggestions from code review of branch no-dev-tools
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
This commit is contained in:
parent
a31969d228
commit
20e6cbc1a2
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue