Files
dex/scripts/run.sh
T
zeekay 777bec57cf chore: normalize naming to LX across codebase
Apply consistent naming conventions throughout:
- Standardize product name to "LX" in documentation
- Update README files and API documentation
- Apply linter fixes to all source files
- Update Hummingbot connector documentation
2025-12-11 21:04:37 -08:00

63 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# LX - Run Script
# This script builds and runs various components of the LX
set -e
# Ensure CGO is disabled for compatibility
export CGO_ENABLED=0
case "$1" in
"demo")
echo "๐Ÿš€ Running LX Demo..."
go run ./cmd/demo
;;
"server")
echo "๐ŸŒ Starting DEX Server..."
echo "Usage: $0 server [port]"
PORT=${2:-8080}
go run ./cmd/dex-server -port $PORT
;;
"memory")
echo "๐Ÿ“Š Running Memory Analysis..."
go run ./cmd/memory-analysis
;;
"test")
echo "๐Ÿงช Running Tests..."
go test ./pkg/... -short -timeout 30s
;;
"build")
echo "๐Ÿ”จ Building all packages..."
go build ./pkg/...
echo "โœ… Build successful!"
;;
"benchmark")
echo "โšก Running Benchmarks..."
go test ./pkg/lx -bench=. -run=^$ -benchtime=10s
;;
*)
echo "LX - Ultra High-Performance Order Book"
echo ""
echo "Usage: ./run.sh [command]"
echo ""
echo "Commands:"
echo " demo - Run interactive order book demo"
echo " server - Start DEX server (default port: 8080)"
echo " memory - Analyze memory usage for 1M markets"
echo " test - Run all tests"
echo " build - Build all packages"
echo " benchmark - Run performance benchmarks"
echo ""
echo "Examples:"
echo " ./run.sh demo"
echo " ./run.sh server 9090"
echo " ./run.sh test"
;;
esac