When im using MEAN stack, I always needs to visit the url like
example.com:3000
How do I remove the port in the url?
To:
example.com
When im using MEAN stack, I always needs to visit the url like
example.com:3000
How do I remove the port in the url?
To:
example.com
Swap your port to listen to port 80
HTTP is 80
HTTPS is 443
Example:
const express = require( 'express' ),
app = express();
app.get( '/', function( req, res ) {
res.send( 'hello world' );
} );
app.listen( 80 );
If you would like to change the domain that you access the website with you can add that domain to your hosts file in addition to changing the port to 80. See here: https://stackoverflow.com/a/33682007/3753389