wangshenxue-captcha

1.0.0 • Public • Published

验证码小工具

下载

npm i wangshenxue-captcha -S

使用-结合http模块

const http = require('http')
const svgCaptcha = require('wangshenxue-captcha')

const app = http.createServer((req, res) => {

const captcha = svgCaptcha.create();
res.setHeader('content-type', 'text/html;charset=utf-8')
res.end(captcha.data)
}) 

app.listen(3000, () => {
    console.log('启动成功,访问 http://localhost:3000');
})

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i wangshenxue-captcha

      Weekly Downloads

      2

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      1.75 kB

      Total Files

      4

      Last publish

      Collaborators

      • freedomw