Connect your services to Restate Cloud and serve them over the connection.
import * as restate from "@restatedev/restate-sdk";restate.connect({ services: [greeter], name: "greeter-v1" }); Copy
import * as restate from "@restatedev/restate-sdk";restate.connect({ services: [greeter], name: "greeter-v1" });
The connection needs two things:
name
RESTATE_CONNECT_NAME
RESTATE_CONNECT_KEY
Both are read from the process environment; the SDK never reads a file.
Once connected, the SDK logs how to register the deployment, once:
Connecting to Restate Cloud environment env_201k… (eu.restate.cloud)Connected as "greeter-v1"Register it once: restate deployments register connect://greeter-v1 or open https://cloud.restate.dev/to/overview?register-deployment=connect://greeter-v1 Copy
Connecting to Restate Cloud environment env_201k… (eu.restate.cloud)Connected as "greeter-v1"Register it once: restate deployments register connect://greeter-v1 or open https://cloud.restate.dev/to/overview?register-deployment=connect://greeter-v1
The returned Connection reconnects in the background until closed.
the services, the name and the tuning, see ConnectOptions
the connection handle
Connect your services to Restate Cloud and serve them over the connection.
The connection needs two things:
nameoption, orRESTATE_CONNECT_NAME): the identity you register, shared by replicas of the same deployment;RESTATE_CONNECT_KEY): one string you can obtain from Cloud UI -> Development → Configure SDK.Both are read from the process environment; the SDK never reads a file.
Once connected, the SDK logs how to register the deployment, once:
The returned Connection reconnects in the background until closed.