mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
feat(dev): change default npm dev script to device mode and add wrapper script to set environment variable and proxy signal api (#157)
This commit is contained in:
21
ui/dev_device.sh
Executable file
21
ui/dev_device.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Print header
|
||||
echo "┌──────────────────────────────────────┐"
|
||||
echo "│ JetKVM Development Setup │"
|
||||
echo "└──────────────────────────────────────┘"
|
||||
|
||||
# Prompt for IP address
|
||||
printf "Please enter the IP address of your JetKVM device: "
|
||||
read ip_address
|
||||
|
||||
# Validate input is not empty
|
||||
if [ -z "$ip_address" ]; then
|
||||
echo "Error: IP address cannot be empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set the environment variable and run Vite
|
||||
echo "Starting development server with JetKVM device at: $ip_address"
|
||||
sleep 1
|
||||
JETKVM_PROXY_URL="http://$ip_address" vite dev --mode=device
|
||||
Reference in New Issue
Block a user