File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1- # cert-helper
1+ # Cert Helper
22
33Install and trust certificates automatically. Very useful in the use of agent software scenarios.
44
55## Usage
66
7+ ### Install
8+
9+ ``` sh
10+ npm i cert-helper
11+ ```
12+
713### install certificate
814
915Install certification as root certificate
1016
1117``` js
12- const { certInstaller } = require (" cert-helper" );
13- certInstaller (path .resolve (" ./certs/root.crt" ), err => {
18+ const { certInstaller } = require (' cert-helper' );
19+ certInstaller (path .resolve (' ./certs/root.crt' ), ( err ) => {
1420 if (err) {
1521 // install error
1622 } else {
@@ -24,18 +30,18 @@ certInstaller(path.resolve("./certs/root.crt"), err => {
2430Check certificate is installed
2531
2632``` js
27- const { certVerify } = require (" cert-helper" );
33+ const { certVerify } = require (' cert-helper' );
2834certVerify (
2935 {
30- certDir: path .resolve (" ./certs/root.crt" ),
31- certName: " certificate name"
36+ certDir: path .resolve (' ./certs/root.crt' ),
37+ certName: ' certificate name' ,
3238 },
3339
34- err => {
40+ ( err ) => {
3541 if (err) {
36- console .info (" Check cert failed!" );
42+ console .info (' Check cert failed!' );
3743 } else {
38- console .info (" Check cert success!" );
44+ console .info (' Check cert success!' );
3945 }
4046 }
4147);
Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "scripts" : {
77 "test" : " echo \" Error: no test specified\" && exit 1" ,
8- "lint:style" : " stylelint --fix src /**/*.{less,scss,css}" ,
9- "lint:js" : " eslint --fix src --ext .js,.jsx"
8+ "lint:style" : " stylelint --fix lib /**/*.{less,scss,css}" ,
9+ "lint:js" : " eslint --fix lib --ext .js,.jsx"
1010 },
1111 "repository" : {
1212 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments