How to do redirect in node/express

app.use(function ( req, res, next ) {

if ( === "") {

Here when we detect the host name is, it will redirect to Since I always use https, I just hard coded https there.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.