ServCloud is the process orchestrator and hosting backend service for the Serv ecosystem. It mimics a managed PaaS, allowing developers to deploy services dynamically via HTTP APIs.
- PaaS Deployment API: Compile and run
.srvbackground services on demand. - Process Isolation: Allocates dedicated ports and tracks active process metrics.
- Dynamic Gateway Routing: Automatically registers running service endpoints with
ServGate. - Telemetry & Logs: Captures output/error pipes into a ring buffer for REST-based log streaming.
- OTel Tracing: Deep integration with the shared tracing system via
ServShared.
- Go 1.21 or higher
- (Optional)
servcommand-line compiler
To start the ServCloud daemon:
go run main.go --port 8085 --workdir ./.deployments --gateway http://localhost:8080 --port <port> Port to listen on (default: 8085)
--workdir <path> Directory for deployments and builds (default: ./.deployments)
--gateway <url> ServGate endpoint for dynamic route sync (default: http://localhost:8080)
--auth-token <val> Auth token for Gateway registration (default: secret-token)
--version Print version information and exit
- Method:
POST - Path:
/api/deploy - Payload:
{ "name": "my-worker", "code": "server \"8080\" { route \"/\" -> \"OK\" }" }
- Method:
GET - Path:
/api/services
- Method:
GET - Path:
/api/services/:name/logs
- Method:
DELETE - Path:
/api/services/:name