diff --git a/template/src/app.ts b/template/src/app.ts index e48a12b..73b2713 100644 --- a/template/src/app.ts +++ b/template/src/app.ts @@ -14,7 +14,7 @@ import * as restate from "@restatedev/restate-sdk"; // // The routes and handlers in the service const router = restate.router({ - hello: async (ctx: restate.RpcContext, name: string) => { + hello: async (ctx: restate.Context, name: string) => { return `Hello ${name}!`; } }); @@ -25,7 +25,7 @@ export const service: restate.ServiceApi = { path: "myservice" } // Create the Restate server to accept requests restate - .createServer() + .endpoint() .bindRouter(service.path, router) .listen(9080); diff --git a/template_grpc/src/app.ts b/template_grpc/src/app.ts index df39630..5200aad 100644 --- a/template_grpc/src/app.ts +++ b/template_grpc/src/app.ts @@ -30,7 +30,7 @@ export class MyExampleService implements ExampleService { // Create the Restate server to accept requests to the service(s) restate - .createServer() + .endpoint() .bindService({ service: "ExampleService", // public name of the service, must match the name in the .proto definition instance: new MyExampleService(), // the instance of the implementation