1.0.1 • Published 2 years ago
laborerseven-captcha v1.0.1
下载
npm i laborerseven-captcha -S
使用
const captcha = require('laborerseven-captcha')
let temp = captcha.create()
console.log(temp)
结合http模块
const captcha = require('laborerseven-captcha')
const http = require('http')
const app=http.createServer((req, res) => {
const temp = captcha.create()
res.setHeader('content-type', 'text/html;charset=utf-8')
res.end(temp.data)
})
app.listen(3000, () => {
console.log('启动成功, 访问测试 http://localhost:3000');
})