Using Vite's proxy option allows us to avoid CORS issues when the host for Uvicorn doesn't match the host for Vite, e.g. localhost vs. 127.0.0.1.
15 lines
209 B
Bash
Executable file
15 lines
209 B
Bash
Executable file
#!/bin/sh -eu
|
|
|
|
: "${UNWIND_PORT:=8097}"
|
|
|
|
cd "$RUN_DIR"
|
|
|
|
[ -z "${DEBUG:-}" ] || set -x
|
|
|
|
export UNWIND_PORT
|
|
|
|
exec uvicorn \
|
|
--host 0.0.0.0 \
|
|
--port "$UNWIND_PORT" \
|
|
--factory \
|
|
unwind:create_app
|