public static int Main(string[] args) { var microservice = new MicroserviceHostBuilder("hello") .UseDefaultWebStack(listenPortNumber: 5000) .AutoDiscoverComponents() .Build(); return(microservice.Run(args)); }
public static int Main(string[] args) { var microservice = new MicroserviceHostBuilder() .UseInjectionAdapterAutofac() .UsePlatformMessaging() .UsePlatformMessagingAdapterKestrel() .UsePlatformRest() .ContributeComponents((existingComponents, newComponents) => { newComponents .ContributeTransactionScript <HelloWorldTx>(); newComponents .ContributeHttpEndpoint(name: "rest-api") .RouteRequestsToRestApiService(protocolName: MessageProtocolInfo.Select.HttpRestNWheelsV1().ProtocolName); }) .Build(); return(microservice.Run(args)); }
public static int Main(string[] args) { var microservice = new MicroserviceHostBuilder("hello") .UseAutofac() .UseKestrel() .UseAngular() .UseMessaging() .UseRest() .UseUidl() .UseMessageProtocol <HttpRestNWheelsV1Protocol>() .UseRestApiHttpEndpoint <HttpRestNWheelsV1Protocol>(listenPortNumber: 5000) .ContributeComponents((existingComponents, newComponents) => { newComponents.ContributeTransactionScript <HelloWorldTx>(); newComponents.ContributeWebApp <HelloWorldApp>(urlPathBase: "/"); }) .UseApplicationFeature <GeneratedCodePrototypesFeatureLoader>() .Build(); return(microservice.Run(args)); }