wangjialiang
v3.0.1
Published
svg-captcha模块
Downloads
4
Readme
下载
npm i wangjialiang -g
或
npm i wangjialiang -S
使用-结合http模块
const http = require('http')
const svgCaptcha = require('wangjialiang')
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');
})
