1.0.0 • Published 2 years ago
mnisting-captcha v1.0.0
⬇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');
})
1.0.0
2 years ago