1.0.0 • Published 2 years ago

dh-captcha v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

npm i dh-captcha -S

如何使用
const captcha = require('dh-captcha')
let C = captcha.create()
const http = require('http')
const captcha = require('dh-captcha')

http.createServer((req,res) => {
    res.setHeader('content-type', 'text/html;charset=utf-8')
    let C = captcha.create()
    // console.log(C); // {text:"". data: svg}
    res.end(C.data)
}).listen(3000,() => {
    log('启动成功,访问: http://localhost:3000');
})
1.0.0

2 years ago