mnisting-captcha
v1.0.0
Published
验证码
Downloads
2
Readme
⬇Install
npm i mnisting-captcha -S
Usage
const http = require('http')
const captcha = require('mnisting-captcha')
const app = http.createServer((req, res) => {
let temp = captcha.create()
// console.log(temp) // {text:'D3DS', data: '<svg></svg>'}
res.setHeader("Content-Type", "image/svg+xml");
res.end(temp.data)
})
app.listen(3000, () => {
console.log('启动成功,访问测试:http://localhost:3000');
})