Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssl-express-www

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssl-express-www

Force SSL (HTTPS) when HTTP is required using Express (Nodejs). Remove www and slash end on domain.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
473
decreased by-79.14%
Maintainers
2
Weekly downloads
 
Created
Source

Force SSL using Express

Force SSL (HTTPS) when HTTP is required using Express (Nodejs). Remove www and trailing slash on domain.

project-version downloads npm mocha test

Installation

npm i ssl-express-www

Usage CommonJS

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.'));

Usage ES6

Transpile it with Babel

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.'));

Solve LF replace to CRLF on Git

This command will solve the problem with linebreak replacement on git commit.

git config --global core.autocrlf input

Contributing

Babel@6 doesn't export default module.exports any more.

npm i -D babel-plugin-add-module-exports

Usage in file .babelrc

{
  "presets": ["env"],
  "plugins": [
    "add-module-exports"
  ]
}

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs

Package last updated on 02 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc