37 lines
1.0 KiB
Markdown
37 lines
1.0 KiB
Markdown
# BASE_PATH Demo
|
|
|
|
Minimal Leptos SSR project that reuses a few components from `ui` to validate `SiteConfig::BASE_PATH`.
|
|
|
|
The public app path is `/rustui`, while Leptos SSR routes are still declared as `/`, `/check`, and `/deep/nested`. The server strips `/rustui` before route matching, and the client router uses `/rustui` as its base.
|
|
|
|
```bash
|
|
cargo leptos watch
|
|
```
|
|
|
|
Then open:
|
|
|
|
- `http://127.0.0.1:3100/rustui`
|
|
- `http://127.0.0.1:3100/rustui/check`
|
|
- `http://127.0.0.1:3100/rustui/deep/nested`
|
|
|
|
Change `app_config/src/lib.rs` to test another base path.
|
|
|
|
## Terminal Renderer Bench
|
|
|
|
The terminal benchmark script connects to an already-running dev server; it does
|
|
not start or stop services.
|
|
|
|
Install the Node dependency and Chromium browser once before running it:
|
|
|
|
```bash
|
|
npm install
|
|
npx playwright install chromium
|
|
```
|
|
|
|
```bash
|
|
npm run terminal:bench -- --url http://127.0.0.1:3100/rustui/terminal
|
|
```
|
|
|
|
It writes `target/terminal-bench/terminal-bench.json` plus screenshots when
|
|
Playwright is available in the workspace.
|