Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ce0fffe3e | ||
|
|
f483cf978c | ||
|
|
0e12e3a531 | ||
|
|
67bea9a2a7 |
@@ -276,6 +276,6 @@ def _devmode_respond(request: Request, name=""):
|
|||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
status_code=409,
|
status_code=409,
|
||||||
content={
|
content={
|
||||||
"detail": "Frontend assets served by Vite in debug mode. You are on backend, connect to frontend instead."
|
"detail": "[devmode] Not serving frontend files here. Should you connect to Vite instead?"
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
+12
-1
@@ -50,7 +50,18 @@ def ruff_format_content(content: str, target_path: Path) -> str:
|
|||||||
temp_file.write_text(content, "UTF-8", newline="\n")
|
temp_file.write_text(content, "UTF-8", newline="\n")
|
||||||
# Sort imports first
|
# Sort imports first
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["uv", "run", "--with", "ruff", "ruff", "check", "--select", "I", "--fix", str(temp_file)],
|
[
|
||||||
|
"uv",
|
||||||
|
"run",
|
||||||
|
"--with",
|
||||||
|
"ruff",
|
||||||
|
"ruff",
|
||||||
|
"check",
|
||||||
|
"--select",
|
||||||
|
"I",
|
||||||
|
"--fix",
|
||||||
|
str(temp_file),
|
||||||
|
],
|
||||||
cwd=target_path.parent,
|
cwd=target_path.parent,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import os
|
|||||||
from fastapi_vue import server
|
from fastapi_vue import server
|
||||||
|
|
||||||
DEFAULT_PORT = TEMPLATE_DEFAULT_PORT
|
DEFAULT_PORT = TEMPLATE_DEFAULT_PORT
|
||||||
DEVMODE = bool(os.getenv("ENVPREFIX_DEV") == "1")
|
DEVMODE = os.getenv("ENVPREFIX_DEV") == "1"
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default function fastapiVue({ paths = ["/api"] } = {}) {
|
export default function fastapiVue({ paths = ["/api"] } = {}) {
|
||||||
const backendUrl = process.env.ENVPREFIX_BACKEND_URL || "http://localhost:TEMPLATE_DEFAULT_PORT"
|
const backendUrl = process.env.ENVPREFIX_BACKEND_URL || "http://localhost:TEMPLATE_DEV_PORT"
|
||||||
|
|
||||||
// Build proxy configuration for each path
|
// Build proxy configuration for each path
|
||||||
const proxy = {}
|
const proxy = {}
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ def main():
|
|||||||
epilog=HELP_EPILOG,
|
epilog=HELP_EPILOG,
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-l", "--listen",
|
"-l",
|
||||||
|
"--listen",
|
||||||
metavar="host:port",
|
metavar="host:port",
|
||||||
help=f"Vite (default: localhost:{DEFAULT_VITE_PORT})",
|
help=f"Vite (default: localhost:{DEFAULT_VITE_PORT})",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user