2.0.10 • Published 1 year ago
vertx-http-gateway-js-connector v2.0.10
vertx-http-gateway-js-connector
What is it
Javascript implementation for vertx-http-gateway-connector
How to use
import * as http from "http";
import {AddressInfo} from "node:net";
import {VertxHttpGatewayConnector} from "../src";
const server = http.createServer((req, res) => {
if (req.url?.includes("/js-service/a")) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('js service okay');
} else {
res.writeHead(404, { 'Content-Type': 'text/plain' });
res.end('not found');
}
});
server.listen(0, "localhost", () => {
const port = (server.address() as AddressInfo).port;
console.log(`Http Server started at port ${port}`);
const connector = new VertxHttpGatewayConnector({
registerPort: 9090,
registerHost: "localhost",
registerUseSsl: false,
serviceName: "js-service",
servicePort: port,
serviceUseSsl: false,
instanceNum: 2,
serviceHost: "localhost",
registerPath: "/register"
});
connector.start();
// setTimeout(() => connector.stop(), 10000);
});
2.0.10
1 year ago
2.0.9
1 year ago
2.0.8
1 year ago
2.0.7
1 year ago
2.0.3
1 year ago
2.0.2
1 year ago
2.0.5
1 year ago
2.0.4
1 year ago
2.0.6
1 year ago
2.0.0
1 year ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago