Change default port to 8989 like Droppy. Using 8999 for backend in dev mode.

This commit is contained in:
Leo Vasanko
2026-02-01 06:09:56 +00:00
parent 1e207b38b7
commit 5c530652fa
5 changed files with 20 additions and 16 deletions
+5 -5
View File
@@ -57,7 +57,7 @@ Usage:
Options:
-c CONFDIR Custom config directory
-l LISTEN-ADDR Listen on
:8000 (localhost port, plain http)
:8989 (localhost port, plain http)
<addr>:3000 (bind another address, port)
/path/to/unix.sock (unix socket)
example.com (run on 80 and 443 with LetsEncrypt)
@@ -80,7 +80,7 @@ Environment:
first_time_help = """\
No config file found! Get started with:
cista --user yourname --privileged # If you want user accounts
cista -l :8000 /path/to/files # Run the server on localhost:8000
cista -l :8989 /path/to/files # Run the server on localhost:8989
See cista --help for other options!
"""
@@ -140,7 +140,7 @@ def _main():
if listen:
settings["listen"] = listen
elif not exists:
settings["listen"] = ":8000"
settings["listen"] = ":8989"
config.update_config(settings)
# Prepare to serve
url, opts = serve.parse_listen(config.config.listen)
@@ -186,7 +186,7 @@ def _user(args):
# Defaults for new config when user is created
operation = config.update_config(
{
"listen": ":8000",
"listen": ":8989",
"path": Path.home() / "Downloads",
"public": False,
}
@@ -215,7 +215,7 @@ def _user(args):
if operation == "created":
sys.stderr.write(
"Now you can run the server:\n cista # defaults set: -l :8000 ~/Downloads\n"
"Now you can run the server:\n cista # defaults set: -l :8989 ~/Downloads\n"
)
+6 -2
View File
@@ -50,7 +50,7 @@ def parse_listen(listen):
return f"https://{listen}", {"host": listen, "port": 443, "ssl": True}
# Use fastapi_vue's parse_endpoint for everything else
endpoints = parse_endpoint(listen, default_port=8000)
endpoints = parse_endpoint(listen, default_port=8989)
ep = endpoints[0]
if "uds" in ep:
@@ -64,5 +64,9 @@ def parse_listen(listen):
host, port = ep["host"], ep["port"]
# When binding all interfaces, use single_listener=False for Sanic
if len(endpoints) > 1:
return f"http://localhost:{port}", {"host": host, "port": port, "single_listener": False}
return f"http://localhost:{port}", {
"host": host,
"port": port,
"single_listener": False,
}
return f"http://{host}:{port}", {"host": host, "port": port}
+2 -2
View File
@@ -6,10 +6,10 @@
* - Builds to the Python module's frontend-build directory
*
* Environment variables (with defaults):
* FASTAPI_VUE_BACKEND_URL=http://localhost:5180 - Backend API URL for proxying
* FASTAPI_VUE_BACKEND_URL=http://localhost:8999 - Backend API URL for proxying
*/
const backendUrl = process.env.FASTAPI_VUE_BACKEND_URL || "http://localhost:5180"
const backendUrl = process.env.FASTAPI_VUE_BACKEND_URL || "http://localhost:8999"
export default function fastapiVue({ paths = ["/api"] } = {}) {
// Build proxy configuration for each path
+5 -5
View File
@@ -5,8 +5,8 @@ Usage:
uv run scripts/devserver.py [frontend] [--backend backend]
Options:
frontend Vite frontend endpoint (default: localhost:5173)
--backend Cista backend endpoint (default: from config, or :8000)
frontend Vite frontend endpoint (default: localhost:8989)
--backend Cista backend endpoint (default: from config, or :8999)
Environment:
JS_RUNTIME Path or name of JS runtime to use (deno, npm/node or bun).
@@ -26,7 +26,7 @@ from devutil import ProcessGroup, logger, ready, setup_vite # type: ignore
from cista import config
from cista.serve import parse_listen
DEFAULT_BACKEND_PORT = 8000
DEFAULT_BACKEND_PORT = 8999
def setup_sanic_backend(listen: str | None) -> tuple[str, list[str]]:
@@ -81,13 +81,13 @@ def main():
"frontend",
nargs="?",
metavar="host:port",
help="Vite frontend endpoint (default: localhost:5173)",
help="Vite frontend endpoint (default: localhost:8989)",
)
parser.add_argument(
"--backend",
"-l",
metavar="host:port",
help="Cista backend endpoint (default: from config, or :8000)",
help="Cista backend endpoint (default: from config, or :8999)",
)
args = parser.parse_args()
with contextlib.suppress(KeyboardInterrupt):
+2 -2
View File
@@ -7,8 +7,8 @@ import httpx
from buildutil import find_dev_tool, find_install_tool, logger
from fastapi_vue.hostutil import parse_endpoint
DEFAULT_VITE_PORT = 5173
DEFAULT_BACKEND_PORT = 5180
DEFAULT_VITE_PORT = 8989
DEFAULT_BACKEND_PORT = 8999
class ProcessGroup: