Servers
Link a machine you run to Pxxl, watch it, and run actions on it. See bring your own server for what linking does and which plans include it.pxxl.servers uses the client’s teamId by default. list() and create() also accept their own teamId.
An action is
restart, stop, start, logs, prune, or update. Pass app (a container or project name) to act on one app instead of the whole server.
runAction() queues the action and checks its status every 1.5 seconds until it finishes or timeoutMs passes. The default timeout is 120 seconds. It returns the latest status either way, so check status on the result.
runOp() runs read operations by default. Pass change: true for operations that change the server. It waits for the result unless you pass wait: false.
Network checks and plan limits
all or tools scope for tools, tunnels, and webhooks. Creating or connecting needs a read-and-write key.
Tunnels
A tunnel gives an app on your machine a public HTTPS URL. The connection goes out over HTTPS, so it works behind NAT and firewalls, and WebSockets work too. See tunnels for the dashboard and CLI.expose() reuses the tunnel with that name, or creates it. Without a name it uses your machine name and the port, such as my-laptop-3000.
Connection options
The local service: a port such as
3000, or a URL such as http://localhost:8080. expose() takes it as its first argument.Ask visitors to sign in first. Pass
"user:password" or an object with username and password.The
Host header your app sees. rewrite uses the target’s host, preserve keeps the public host, and any other value is sent as is.The connection
connect() and expose() return a TunnelConnection.
When retrying cannot help, such as a revoked key, a missing tunnel, or a plan limit, the tunnel stops with a
TunnelFatalError. Its status field holds the HTTP status.
Tunnel operations
create() and rotate() return a tunnel token and ready-made install and connect commands for the pxxl-tunnel client. The SDK’s own connection uses your API key instead.
Webhooks
A webhook endpoint gives you a URL that records every request sent to it. You can forward requests from Pxxl, replay them, or stream them to your machine. See webhooks for the dashboard and CLI.Endpoint fields
Listen on your machine
listen() checks the endpoint for new requests and passes each one to onRequest. With forward, it also sends the request to that URL from your machine, so localhost works.
listen() returns endpoint, stop(), and closed, a promise that resolves after you stop. Forwarded requests carry an X-Pxxl-Webhook-Request header with the request ID.
Webhook operations
replay() sends the request again from Pxxl, to the endpoint’s forwardUrl or to the url you pass. That URL must be public. Use listen() to deliver to localhost.

