use of org.ballerinalang.composer.server.service.ConfigService in project ballerina by ballerina-lang.
the class Server method start.
public void start() {
// create services
for (ComposerServiceProvider serviceProvider : serviceProviderLoader) {
ComposerService service = serviceProvider.createService(serverConfig);
if (service != null) {
serviceList.add(service);
}
}
// deploy services
for (ComposerService service : serviceList) {
if (service.getServiceInfo().getType() == ServiceType.HTTP) {
microservicesRunner.deploy(service);
} else if (service.getServiceInfo().getType() == ServiceType.WS) {
microservicesRunner.deployWebSocketEndpoint(service);
}
}
// deploy ep info service
microservicesRunner.deploy(new ConfigService(serverConfig, serviceList));
// deploy public content service
microservicesRunner.deploy(new PublicContentService(serverConfig));
microservicesRunner.start();
}
Aggregations