Skip to content

Commit b2b13ca

Browse files
committed
fix(rivetkit): bind handler to Registry in serve
1 parent 936d34d commit b2b13ca

File tree

1 file changed

+3
-7
lines changed
  • rivetkit-typescript/packages/rivetkit/src/registry

1 file changed

+3
-7
lines changed

rivetkit-typescript/packages/rivetkit/src/registry/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class Registry<A extends RegistryActors> {
9292
* ```
9393
*/
9494
public serve(): ServerlessHandler {
95-
return { fetch: this.handler };
95+
return { fetch: this.handler.bind(this) };
9696
}
9797

9898
/**
@@ -239,13 +239,9 @@ export class Registry<A extends RegistryActors> {
239239
` RivetKit ${pkg.version} (${driver.displayName})`,
240240
);
241241
// Only show endpoint if manager is running or engine is spawned
242-
const shouldShowEndpoint =
243-
config.serveManager ||
244-
(kind === "serverless" && config.serverless.spawnEngine);
245242
if (
246-
kind === "serverless" &&
247-
config.serverless.advertiseEndpoint &&
248-
shouldShowEndpoint
243+
config.serveManager ||
244+
(kind === "serverless" && config.serverless.spawnEngine)
249245
) {
250246
console.log(
251247
` - Endpoint: ${config.serverless.advertiseEndpoint}`,

0 commit comments

Comments
 (0)