0.0.1-1 • Published 4 years ago

create-trusted-cert v0.0.1-1

Weekly downloads
3
License
-
Repository
-
Last release
4 years ago

create-self-signed

使用

命令行

npm install create-self-signed -g
self-signed --help

api调用

const { obtainSelfSigned } = require('create-self-signed')
const hosts = ['local.m.taobao.com'] // 本地https服务要使用的host
obtainSelfSigned(hosts).then(result => {
    // result
    // {
    //     success: true,
    //     sslKeyPath: '/Users/xxx/.self-signed-cert/ssl.key',
    //     sslCrtPath: '/Users/xxx/.self-signed-cert/ssl.crt',
    //     certTrusted: true
    // }
})