import { createApplication } from '@setu-ts/kernel';import { RuntimePlugin } from '@setu-ts/runtime';import { GrpcPlugin } from '@setu-ts/grpc-plugin';import { CAPABILITIES, type IGrpcService } from '@setu-ts/common';const app = createApplication({ plugins: [RuntimePlugin(), GrpcPlugin()],});await app.start({ port: 3000 });// The plugin registers CAPABILITIES.GRPC during start(), so resolve it// only AFTER start() resolves — before that, the capability does not exist.const grpc = app.services.get<IGrpcService>(CAPABILITIES.GRPC); Copy
import { createApplication } from '@setu-ts/kernel';import { RuntimePlugin } from '@setu-ts/runtime';import { GrpcPlugin } from '@setu-ts/grpc-plugin';import { CAPABILITIES, type IGrpcService } from '@setu-ts/common';const app = createApplication({ plugins: [RuntimePlugin(), GrpcPlugin()],});await app.start({ port: 3000 });// The plugin registers CAPABILITIES.GRPC during start(), so resolve it// only AFTER start() resolves — before that, the capability does not exist.const grpc = app.services.get<IGrpcService>(CAPABILITIES.GRPC);
Example