-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Before you run the front-end code, you need to have a running HoloInsight backend, you can refer to [this document](../test/README.md#deployment-for-testing) to start a backend. | ||
|
||
Suppose the address of the backend is `http://xx.xx.xx.xx:12345`, you need to configure `./front/config/config.ts`: | ||
|
||
```ts | ||
export default defineConfig({ | ||
... | ||
proxy: { | ||
'/webapi/': { | ||
target: 'http://xx.xx.xx.xx:12345', | ||
changeOrigin: true, | ||
}, | ||
} | ||
... | ||
}); | ||
``` | ||
|
||
Run front dev server: | ||
```bash | ||
cd front/ && yarn run dev | ||
``` | ||
|
||
Example output: | ||
```text | ||
$yarn run dev | ||
yarn run v1.22.19 | ||
$ max dev | ||
info - Umi v4.0.68 | ||
info - Preparing... | ||
info - MFSU eager strategy enabled | ||
[HPM] Proxy created: /webapi/ -> http://xx.xx.xx.xx:12345 | ||
event - [MFSU][eager] start build deps | ||
info - [MFSU] buildDeps since cacheDependency has changed | ||
╔════════════════════════════════════════════════════╗ | ||
║ App listening at: ║ | ||
║ > Local: http://localhost:8000 ║ | ||
ready - ║ > Network: http://xx.xx.xx.xx:8000 ║ | ||
║ ║ | ||
║ Now you can open browser with the above addresses↑ ║ | ||
╚════════════════════════════════════════════════════╝ | ||
info - [MFSU][eager] worker init, takes 562ms | ||
... | ||
``` | ||
|
||
Visit the front pages at `http://xx.xx.xx.xx:8000`. |