maria maria - 1 year ago 107
Node.js Question

Mean stack / node website port

When im using node / mean stack, i always needs to visit the url like

is there a way to remove the port in the url, and still make it works?

to like:

Answer Source

Swap your port to listen to port 80

HTTP is 80

HTTPS is 443


const express = require( 'express' ),
      app = express();

app.get( '/', function( req, res ) {
    res.send( 'hello world' );
} );

app.listen( 80 );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download