mirror of
https://github.com/geoffsee/predict-otron-9001.git
synced 2025-09-08 22:46:44 +00:00
chat-ui not functional yet but builds
This commit is contained in:
14
scripts/build_ui.sh
Executable file
14
scripts/build_ui.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Resolve the project root (script_dir/..)
|
||||
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
# Move into the chat-ui crate
|
||||
cd "$PROJECT_ROOT/crates/chat-ui" || exit 1
|
||||
|
||||
# Build with cargo leptos
|
||||
cargo leptos build --release
|
||||
|
||||
# Move the wasm file, keeping paths relative to the project root
|
||||
mv "$PROJECT_ROOT/target/site/pkg/chat-ui.wasm" \
|
||||
"$PROJECT_ROOT/target/site/pkg/chat-ui_bg.wasm"
|
17
scripts/run.sh
Executable file
17
scripts/run.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Resolve the project root (script_dir/..)
|
||||
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
# todo, conditionally run this only when those files change
|
||||
"$PROJECT_ROOT/scripts/build_ui.sh"
|
||||
|
||||
# build the frontend first
|
||||
# Start the unified predict-otron-9000 server on port 8080
|
||||
export SERVER_PORT=${SERVER_PORT:-8080}
|
||||
export RUST_LOG=${RUST_LOG:-info}
|
||||
|
||||
cd "$PROJECT_ROOT" || exit 1
|
||||
cargo run --bin predict-otron-9000 --release
|
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start the unified predict-otron-9000 server on port 8080
|
||||
export SERVER_PORT=${SERVER_PORT:-8080}
|
||||
export RUST_LOG=${RUST_LOG:-info}
|
||||
|
||||
cargo run --bin predict-otron-9000 --release
|
Reference in New Issue
Block a user