1.0.2 • Published 1 year ago
weblyf-yzm1 v1.0.2
#下载
npm i weblyf-yzm1 -S
#使用 const http = require('http') const svgCaptcha = require('./index.js')
http.createServer((req, res) => {
let captcha = svgCaptcha.createYzm("20","green");
res.setHeader("content-type", "image/svg+xml");
res.end(captcha.data)
}).listen(3000, () => { console.log('启动成功, 访问测试 http://localhost:3000'); })