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

@krakenjs/express-promisified

Package Overview
Dependencies
Maintainers
7
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krakenjs/express-promisified

Express with promises

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

express-promisified

Express with promises

HTTPS Support

  1. Create a .crt and .key in the app using this module
openssl genrsa 2048 > localhost.key
chmod 400 localhost.key
openssl req -new -x509 -nodes -sha256 -days 365 -key localhost.key -out localhost.crt
  1. Press enter through all fields
Country Name (2 letter code) []:
State or Province Name (full name) []:
Locality Name (eg, city) []:
Organization Name (eg, company) []:
Organizational Unit Name (eg, section) []:
Common Name (eg, fully qualified host name) []:
Email Address []:
  1. When calling listenHTTPS you will need to pass the cert and key
import fs from 'fs';
// const fs = require(fs);

...

const port = process.env.PORT
    ? parseInt(process.env.PORT, 10)
    : 8443;
const privateKey = fs.readFileSync('./creds/localhost.key');
const certificate = fs.readFileSync('./creds/localhost.crt');

...

server.listenHTTPS({ port, privateKey, certificate })

Keywords

FAQs

Package last updated on 23 Mar 2022

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