提交 d97f601f authored 作者: 王鹏飞's avatar 王鹏飞

chore: 删除cert.js文件及相关脚本配置

上级 33f3aff4
import fs from 'node:fs'
import path from 'node:path'
import axios from 'axios'
const __dirname = path.resolve()
const domain = 'ezijing.com'
const outputPath = './https'
// 生成文件夹
function genOutputDir() {
if (fs.existsSync(outputPath)) {
console.log('The path exists.')
} else {
fs.mkdir(outputPath, { recursive: true }, err => {
if (err) throw err
})
}
}
function downloadCertFile() {
genOutputDir()
axios.get(`https://ssl.godzyx.com/${domain}/${domain}.key?get=allow`, { responseType: 'stream' }).then(response => {
response.data.pipe(fs.createWriteStream(path.join(__dirname, `${outputPath}/${domain}.key`)))
})
axios.get(`https://ssl.godzyx.com/${domain}/${domain}.pem?get=allow`, { responseType: 'stream' }).then(response => {
response.data.pipe(fs.createWriteStream(path.join(__dirname, `${outputPath}/${domain}.pem`)))
})
}
downloadCertFile()
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
"preview": "vite preview --port 4173", "preview": "vite preview --port 4173",
"typecheck": "vue-tsc -b", "typecheck": "vue-tsc -b",
"lint": "eslint . --fix", "lint": "eslint . --fix",
"deploy": "node ./deploy.js", "deploy": "node ./deploy.js"
"cert": "node ./cert.js"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论