webjiejie
v1.0.1
Published
验证码
Downloads
5
Maintainers
Readme
下载
npm i webjiejie -S
验证码小物件
const captcha = require('webjiejie')
let temp = captcha.create()
console.log(temp)
使用结合http
const http = require('http)
const captcha = require('webjiejie')
http.createServer((req,res)=>{
res.setHeader('content-type',text/html;charset=utf-8)
let temp = captcha.create({
size: 4,
ignoreChars: '0o1i' ,
noise: 1,
color: true,
background: '#cc9966'
})
res.end(temp.data)
}).listen(3000,()=>{
console.log('启动成功,访问:http://localhost:3000')
})