Node.js/Express.js App Only Works on Port 3000

The following works if you have something like this in your app.js: http.createServer(app).listen(app.get(‘port’), function(){ console.log(“Express server listening on port ” + app.get(‘port’)); }); Either explicitly hardcode your code to use the port you want, like: app.set(‘port’, process.env.PORT || 3000); This code means set your port to the environment variable PORT or if that is undefined … Read more

Make docker use IPv4 for port binding

As @daniel-t points out in the comment: github.com/docker/docker/issues/2174 is about showing binding only to IPv6 in netstat, but that is not an issue. As that github issues states: When setting up the proxy, Docker requests the loopback address ‘127.0.0.1’, Linux realises this is an address that exists in IPv6 (as ::0) and opens on both … Read more

Change Oracle port from port 8080

From Start | Run open a command window. Assuming your environmental variables are set correctly start with the following: C:\>sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 26 10:40:44 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> connect Enter user-name: system Enter password: <enter password if will not be visible> Connected. … Read more

Sockets: Discover port availability using Java

This is the implementation coming from the Apache camel project: /** * Checks to see if a specific port is available. * * @param port the port to check for availability */ public static boolean available(int port) { if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) { throw new IllegalArgumentException(“Invalid start port: ” + port); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)