Redirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.
npm install ssl-express-wwwRedirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.
    
``bash`
npm install ssl-express-www
`javascript
var express = require('express');
var secure = require('ssl-express-www');
var app = express();
app.use(secure);
var port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));
`
Transpile it with Babel
`javascript
import express from 'express';
import secure from 'ssl-express-www';
const app = express();
app.use(secure);
let port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));
``
This project is licensed under the MIT License - see the LICENSE file for details