fastify-sslgen
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Fastify SSLGen

A simple Fastify plugin which provides an ability to generate development or self signed SSL certificates.

Installation

Install the package normally using yarn.

yarn add fastify-sslgen

Usage

import fastify = require("fastify")
import sslgen from "fastify-sslgen";
 
const server = fastify({
    http2: true,
    https: true,
});
 
server.register(sslgen, {
    key: "./ssl/private/key.pem",
    cert: "./ssl/certificate.pem",
});
 
server.listen(8443);

Available Options

  • key - A path to read or store the private SSL key.
  • cert - A path to read or store the certificate file.
  • info - Provide information to use when generating the SSL certificates;
    • altNames - Defaults to [ "0.0.0.0", "127.0.0.1" ]
    • commonName - Defaults to "0.0.0.0"
    • country - Defaults to "AU"
    • days - Defaults to 30
    • emailAddress - Defaults to "admin@example.com"
    • locality - Defaults to "Somewhere"
    • organization - Defaults to "Localhost"
    • organizationUnit - Defaults to "Development"
    • state - Defaults to "QLD"

Readme

Keywords

none

Package Sidebar

Install

npm i fastify-sslgen

Weekly Downloads

4

Version

1.0.0

License

none

Unpacked Size

5.09 kB

Total Files

7

Last publish

Collaborators

  • johnloveking
  • orgun109uk