1.0.3 • Published 2 years ago
code-ni-captcha v1.0.3
👇下载
npm i code-ni-captcha -S
👩使用
const captcha = require('code-ni-captcha')
let temp = captcha.create()
console.log(temp)
📣📢🔔结合HTTP模块使用
const http = require('http')
const captcha = require('code-ni-captcha')
http.createServer((req, res) => {
res.setHeader('content-type', 'text/html;charset=utf-8')
let temp = captcha.create()
res.end(temp.data)
}).listen(3000, () => {
console.log('启动成功, 访问:http://localhost:3000');
})