openssl-self-signed-certificate
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "openssl-self-signed-certificate", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Self-signed certificate for development use, generated using openssl. Expires in the year 4754 (4754-06-06).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,1 +27,29 @@ # openssl-self-signed-certificate | ||
``` | ||
# Install | ||
``` | ||
npm install --safe-dev openssl-self-signed-certificate | ||
``` | ||
## Example | ||
``` | ||
var express = require('express'); | ||
var app = express(); | ||
var port = process.env.PORT || 3000; | ||
app.get('/', function(req, res) { | ||
res.send('Hello World!'); | ||
}); | ||
app.listen(port); | ||
console.log(`HTTP started on port ${port}.`); | ||
if (process.env.NODE_ENV !== 'production') { | ||
var https = require('https'); | ||
var options = require('openssl-self-signed-certificate'); | ||
https.createServer(options, app).listen(port + 1); | ||
console.log(`HTTPS started on port ${port} (dev only).`); | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6437
55