Languages
[Edit]
EN

Node.js - run npm project with unauthorized certificates accepting

9 points
Created by:
Root-ssh
178290

In this short article, we would like to show how to run Node.js application with ignoring/accepting unauthorized certificates (lets to create HTTPS connections with untrusted addresses).

Quick solution:

Where:

  • NODE_TLS_REJECT_UNAUTHORIZED=0 permits to create HTTPS connections with untrusted addresses - useful in development mode.

 

Practical example

Edit

It is necessary to indicate the script was want to run. In our case, it will be devServer located in the scripts property.

package.json file example:

Alternative titles

  1. Node.js - accept certificates in npm project
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join