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.
13 lines
195 B
Bash
Executable file
13 lines
195 B
Bash
Executable file
#!/bin/sh -eu
|
|
|
|
cd "$RUN_DIR"
|
|
|
|
# Make Uvicorn defaults explicit.
|
|
: "${API_PORT:=8000}"
|
|
: "${API_HOST:=127.0.0.1}"
|
|
export API_PORT
|
|
export API_HOST
|
|
|
|
[ -z "${DEBUG:-}" ] || set -x
|
|
|
|
exec honcho start
|