diff --git a/API.md b/API.md index ed8d413..8ffcd31 100644 --- a/API.md +++ b/API.md @@ -7,6 +7,7 @@ Complete guide to tingz API with cURL. - Running deployer service on http://localhost:8080 - Admin token (set in `.env.development` as `ADMIN_TOKEN`) set to `devadmintoken` - API version is `v1` +- **Note:** The deployer service only handles API requests (`/api/v1/*`). For serving deployed static sites, you need a separate web server (Caddy, nginx, etc.) configured to serve files from `/var/www/docs` ## Step 1: Create a User (Admin Only) @@ -137,12 +138,21 @@ ls -la deploys/alice/myproject/20251014T180806/ ### Access Your Site +**Note:** The deployer service only handles API requests. Deployed sites are served by a separate web server (like Caddy or nginx) that reads from `/var/www/docs`. + ```bash -curl http://localhost:8080/alice/myproject/ -# or +# If you have a web server configured to serve from /var/www/docs: curl https://docs.yigid.dev/alice/myproject/ ``` +**For local development:** You'll need to set up a web server to serve files from the `docs/` directory, or use a simple HTTP server: + +```bash +# Example: serve files from docs directory +cd docs && python3 -m http.server 3000 +# Then access: http://localhost:3000/alice/myproject/ +``` + ## Complete Workflow Example ```bash @@ -176,8 +186,9 @@ curl -s -X POST "http://localhost:8080/api/v1/deploy" \ -F "project=mysite" \ -F "file=@site.tar.gz" | jq -# 6. Verify -curl http://localhost:8080/alice/mysite/ +# 6. Verify (requires web server setup) +# If you have a web server serving from docs/ directory: +curl http://localhost:3000/alice/mysite/ ``` ## Health Check