npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@denis-kalinin/dev-certs

v1.11.10

Published

Managing certificates on nodejs http server

Downloads

49

Readme

dev-certs

This is a refactored Office-Addin-dev-certs. This package can be used to manage certificates for nodejs development server using any hostname.

The goal of the refactoring is to extend API, adding hostnames parameter to getHttpsServerOptions method.

Installation

npm install @denis-kalinin/dev-certs

Upon installation a development CA certicate and localhost key and certificate will be generated inside <userhome>/.office-addin-dev-certs. The certificate is valid for 30 days by default.

Command-Line Interface

install

Creates an SSL certificate for "localhost" signed by a developer CA certificate and installs the developer CA certificate so that the certificates are trusted. If the certificates were installed but are no longer valid, they will be replaced with valid certificates.

Syntax:

office-addin-dev-certs install [options]

Options:

--machine

Install the CA certificate for all users. You must be an Administrator.

--days <days>

Specifies the number of days until the CA certificate expires. Default: 30 days.

verify

Verify the certificate.

Syntax:

office-addin-dev-certs verify

uninstall

Uninstall the certificate.

Syntax:

office-addin-dev-certs uninstall [options]

Options:

--machine

Uninstall the CA certificate for all users. You must be an Administrator.

API Usage

var https = require('https')
var devCerts = require("@denis-kalinin/dev-certs");
var options =  await devCerts.getHttpsServerOptions({
  cert:{
    domains: ['my.localtest.me', 'localhost'], //certificate's alter names
    fileName: 'localtest' //creates files localtest.crt and localtest.key, useful when using dev-certs in many projects
  },
  ca: {
    validityDays: 90
  }
});

var server = https.createServer(options, function (req, res) {
  res.end('This is servered over HTTPS')
})

server.listen(443, function () {
  console.log('The server is running on https://localhost:443')
})