svg-captcha-cp

1.0.1 • Public • Published

🌈 svg-captcha-cp

Installation

npm i svg-captcha-cp -S
npm i svg-captcha-cp -g

✨ Usage

    const captcha = require('svg-captcha-cp')
    let temp = captcha.create()
    console.log(temp) // {text:'SIF5', data: '<svg></svg>'}

✨ Combining HTTP module

    const http = require('http')
    const captcha = require('svg-captcha-cp')

    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');
    })

Readme

Keywords

Package Sidebar

Install

npm i svg-captcha-cp

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

3.34 kB

Total Files

4

Last publish

Collaborators

  • zenas-cp