heroku-ssl-redirect
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "heroku-ssl-redirect", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Redirect users to the SSL version of your app. For ExpressJS running on Heroku", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
node-heroku-ssl-redirect | ||
======================== | ||
Redirect users to the SSL version of your app. For ExpressJS running on Heroku | ||
Redirect users to the SSL version of your app. For ExpressJS running on Heroku. | ||
This module works only with **import**, don't try to use **require**. | ||
### Installation | ||
@@ -15,13 +17,13 @@ | ||
```js | ||
var sslRedirect = require('heroku-ssl-redirect'); | ||
var express = require('express'); | ||
var app = express(); | ||
import sslRedirect from 'heroku-ssl-redirect'; | ||
import express from 'express'; | ||
const app = express(); | ||
// enable ssl redirect | ||
app.use(sslRedirect()); | ||
app.get('/', function(req, res){ | ||
app.get('/', (req, res) => { | ||
res.send('hello world'); | ||
}); | ||
app.listen(process.env.PORT || 3000); | ||
@@ -49,7 +51,1 @@ ``` | ||
``` | ||
### ExpressJS 3.x ([issue #1](https://github.com/paulomcnally/node-heroku-ssl-redirect/issues/1)) | ||
```bash | ||
npm install git://github.com/paulomcnally/node-heroku-ssl-redirect.git#express3x --save | ||
``` |
4590
50