lsq-svg-captcha
v1.0.0
Published
``` npm i wuhongyi -S ``` #使用
Downloads
2
Readme
#下载
npm i wuhongyi -S
#使用
const http = require('http')
const why= require('wuhongyi')
http.createServer((req, res) => {
let captcha = why.create()
// console.log(captcha); // {data, text}
// res.setHeader('content-type', 'text/html;charset=utf-8')
res.setHeader("content-type", "image/svg+xml");
res.end(captcha.data)
}).listen(3000, () => {
console.log('启动成功, 访问测试 http://localhost:3000');
})