🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

devcert

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devcert

Generate trusted local SSL/TLS certificates for local SSL development

1.2.2
latest
Source
npm
Version published
Weekly downloads
331K
-9.3%
Maintainers
2
Weekly downloads
 
Created

What is devcert?

The devcert npm package is used to generate locally-trusted development SSL certificates. It simplifies the process of creating and managing SSL certificates for local development environments, ensuring that your local development server can run over HTTPS without browser warnings.

What are devcert's main functionalities?

Generate a development SSL certificate

This feature allows you to generate a locally-trusted SSL certificate for a specified domain. The code sample demonstrates how to generate a certificate for the domain 'my-app.test' and log the resulting SSL object.

const devcert = require('devcert');

(async () => {
  const ssl = await devcert.certificateFor('my-app.test');
  console.log(ssl);
})();

Generate a certificate with custom options

This feature allows you to generate a certificate with additional options, such as installing certutil if it's not already installed. The code sample shows how to generate a certificate for 'my-app.test' with the 'installCertutil' option set to true.

const devcert = require('devcert');

(async () => {
  const ssl = await devcert.certificateFor('my-app.test', { installCertutil: true });
  console.log(ssl);
})();

Retrieve existing certificate

This feature allows you to retrieve an existing certificate without modifying the hosts file. The code sample demonstrates how to retrieve a certificate for 'my-app.test' with the 'skipHostsFile' option set to true.

const devcert = require('devcert');

(async () => {
  const ssl = await devcert.certificateFor('my-app.test', { skipHostsFile: true });
  console.log(ssl);
})();

Other packages similar to devcert

Keywords

ssl

FAQs

Package last updated on 10 Jun 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