Restate Typescript SDK
    Preparing search index...
    • 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" });

      The connection needs two things:

      • a name for the deployment (name option, or RESTATE_CONNECT_NAME): the identity you register, shared by replicas of the same deployment;
      • a connect key (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:

      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.

      Parameters

      Returns Connection

      the connection handle