Package Exports
- dh-captcha
- dh-captcha/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dh-captcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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');
})