smalltuotuo-captcha
v1.0.1
Published
验证码模块
Downloads
3
Maintainers
Readme
☆ 验证码模块
cnpm i smalltuotuo-captcha -S
示例 使用
const http = require('http')
const captcha = require('smalltuotuo-captcha')
let temp = captcha.create()
console.log(temp)
示例 使用(结合 http 模块)
const http = require('http')
const captcha = require('smalltuotuo-captcha')
const temp = captcha.data
console.log(temp)
let app = http.createServer((req,res)=>{
res.setHeader('content-type','text/html;charset=utf-8')
let temp = captcha.create()
res.end(temp.data)
})
app.Listen(3000,()=>{
console.log('http://localhost:3000')
})