feat: add production API commands for login and authenticated requests

This commit is contained in:
2026-01-12 03:52:19 -06:00
parent 9d231e6fdc
commit 6f538b599f
+18 -1
View File
@@ -3,6 +3,23 @@ set dotenv-load
default: default:
just --list just --list
# Login to production and save session cookie
login username password:
@echo "Logging in to production..."
@curlie -X POST $API_BASE_URL/api/login \
username='{{username}}' \
password='{{password}}' \
-c .prod-session.txt
@echo "✅ Session saved to .prod-session.txt"
# Check current production session status
session:
@curlie GET $API_BASE_URL/api/session -b .prod-session.txt
# Make authenticated API request to production
api method path *args="":
curlie -X {{method}} $API_BASE_URL{{path}} -b .prod-session.txt {{args}}
[script("bun")] [script("bun")]
check: check:
const checks = [ const checks = [
@@ -83,7 +100,7 @@ serve:
just serve-json | hl --config .hl.config.toml -P just serve-json | hl --config .hl.config.toml -P
serve-json: serve-json:
LOG_JSON=true bunx concurrently --raw --prefix none "SOCKET_PATH=/tmp/xevion-bun.sock bun --preload ../console-logger.js --silent --cwd web/build index.js" "target/release/api --listen localhost:8080 --listen /tmp/xevion-api.sock --downstream /tmp/xevion-bun.sock" LOG_JSON=true UPSTREAM_URL=/tmp/xevion-api.sock bunx concurrently --raw --prefix none "SOCKET_PATH=/tmp/xevion-bun.sock bun --preload ../console-logger.js --silent --cwd web/build index.js" "target/release/api --listen localhost:8080 --listen /tmp/xevion-api.sock --downstream /tmp/xevion-bun.sock"
docker-image: docker-image:
docker build -t xevion-dev . docker build -t xevion-dev .