1.0.3 • Published 2 years ago

cutetotoro-captcha v1.0.3

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

下载

npm i cutetotoro-captcha -S

使用

const captcha = require('cutetotoro-captcha')
let mm = captcha.create()
console.log(mm) // {text:'字符串', data: '<svg>...</svg>'}

结合http

const http = require('http')
const captcha = require('cutetotoro-captcha')

const app = http.createServer((req, res) => {
  res.setHeader('content-type', 'text/html;charset=utf-8')
  let mm = captcha.create();
  console.log(mm) // {text:'字符串', data: '<svg>...</svg>'}
  res.end(mm.data)
});
app.listen(3001, () => {
  console.log('启动成功, 访问  http://localhost:3001');
})
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago