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.
12 lines
179 B
Bash
Executable file
12 lines
179 B
Bash
Executable file
#!/bin/sh -eu
|
|
|
|
cd "$RUN_DIR"
|
|
|
|
[ -z "${DEBUG:-}" ] || set -x
|
|
|
|
exec uvicorn \
|
|
--host "$API_HOST" \
|
|
--port "$API_PORT" \
|
|
--reload \
|
|
--factory \
|
|
unwind:create_app
|