NodeJS Express – separate routes on two ports

Based on Explosion Pills suggestion above, I modified the code in roughly this way: var express = require(‘express’); var things = []; var app = express(); var admin_app = express(); var port = 8080; var admin_port = 8081; app.post(‘/factory/’, function(req, res) { //Create a thing and add it to the thing array }); //Assume more … Read more

Java: Common way to validate and convert “host:port” to InetSocketAddress?

I myself propose one possible workaround solution. Convert a string into URI (this would validate it automatically) and then query the URI’s host and port components. Sadly, an URI with a host component MUST have a scheme. This is why this solution is “not perfect”. String string = … // some string which has to … Read more

Which port(s) does XMPP use?

According to Wikipedia: 5222 TCP XMPP client connection (RFC 6120) Official 5223 TCP XMPP client connection over SSL Unofficial 5269 TCP XMPP server connection (RFC 6120) Official 5298 TCP UDP XMPP JEP-0174: Link-Local Messaging / Official XEP-0174: Serverless Messaging 8010 TCP XMPP File transfers Unofficial The port numbers are defined in RFC 6120 ยง 14.7.

lsof print numeric ports

Run lsof -P. And make sure the P goes before the i, if you combine the option with -i: lsof -Pi According to man lsof, -P inhibits the conversion of port numbers to port names for network files. Inhibiting the conversion may make lsof run a little faster. It is also useful when port name … Read more