FIN
This commit is contained in:
@@ -71,6 +71,11 @@ public class DataLayerAPIVerticle extends AbstractVerticle {
|
|||||||
router.route(HttpMethod.POST, Constants.POST_ACTUATORS).handler(this::addActuator);
|
router.route(HttpMethod.POST, Constants.POST_ACTUATORS).handler(this::addActuator);
|
||||||
router.route(HttpMethod.PUT, Constants.PUT_ACTUATOR_BY_ID).handler(this::updateActuator);
|
router.route(HttpMethod.PUT, Constants.PUT_ACTUATOR_BY_ID).handler(this::updateActuator);
|
||||||
|
|
||||||
|
vertx.createHttpServer()
|
||||||
|
.requestHandler(router)
|
||||||
|
.listen(configManager.getDataApiPort(), configManager.getHost());
|
||||||
|
|
||||||
|
startPromise.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getAllGroups(RoutingContext context) {
|
private void getAllGroups(RoutingContext context) {
|
||||||
|
|||||||
@@ -91,9 +91,11 @@ public class MainVerticle extends AbstractVerticle {
|
|||||||
final DeploymentOptions options = new DeploymentOptions();
|
final DeploymentOptions options = new DeploymentOptions();
|
||||||
options.setThreadingModel(ThreadingModel.WORKER);
|
options.setThreadingModel(ThreadingModel.WORKER);
|
||||||
|
|
||||||
vertx.deployVerticle(new DataLayerAPIVerticle(pool), options, result -> { // Pasa el pool
|
vertx.deployVerticle(new DataLayerAPIVerticle(pool), options, result -> {
|
||||||
if (result.succeeded()) {
|
if (result.succeeded()) {
|
||||||
Constants.LOGGER.info("🟢 DatabaseVerticle desplegado");
|
Constants.LOGGER.info("🟢 DatabaseVerticle desplegado");
|
||||||
|
Constants.LOGGER.info("\t🔗 API URL: " + configManager.getHost()
|
||||||
|
+ ":" + configManager.getDataApiPort());
|
||||||
} else {
|
} else {
|
||||||
Constants.LOGGER.error("🔴 Error deploying DataLayerAPIVerticle: " + result.cause());
|
Constants.LOGGER.error("🔴 Error deploying DataLayerAPIVerticle: " + result.cause());
|
||||||
}
|
}
|
||||||
@@ -102,6 +104,8 @@ public class MainVerticle extends AbstractVerticle {
|
|||||||
vertx.deployVerticle(new LogicLayerAPIVerticle(), options, result -> {
|
vertx.deployVerticle(new LogicLayerAPIVerticle(), options, result -> {
|
||||||
if (result.succeeded()) {
|
if (result.succeeded()) {
|
||||||
Constants.LOGGER.info("🟢 LogicLayerAPIVerticle desplegado");
|
Constants.LOGGER.info("🟢 LogicLayerAPIVerticle desplegado");
|
||||||
|
Constants.LOGGER.info("\t🔗 API URL: " + configManager.getHost()
|
||||||
|
+ ":" + configManager.getLogicApiPort());
|
||||||
} else {
|
} else {
|
||||||
Constants.LOGGER.error("🔴 Error deploying LogicLayerAPIVerticle: " + result.cause());
|
Constants.LOGGER.error("🔴 Error deploying LogicLayerAPIVerticle: " + result.cause());
|
||||||
}
|
}
|
||||||
@@ -110,6 +114,8 @@ public class MainVerticle extends AbstractVerticle {
|
|||||||
vertx.deployVerticle(new WebServerVerticle(), result -> {
|
vertx.deployVerticle(new WebServerVerticle(), result -> {
|
||||||
if (result.succeeded()) {
|
if (result.succeeded()) {
|
||||||
Constants.LOGGER.info("🟢 WebServerVerticle desplegado");
|
Constants.LOGGER.info("🟢 WebServerVerticle desplegado");
|
||||||
|
Constants.LOGGER.info("\t🔗 WEB SERVER URL: " + configManager.getHost()
|
||||||
|
+ ":" + configManager.getWebserverPort());
|
||||||
} else {
|
} else {
|
||||||
Constants.LOGGER.error("🔴 Error deploying WebServerVerticle: " + result.cause());
|
Constants.LOGGER.error("🔴 Error deploying WebServerVerticle: " + result.cause());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user