1.0.3 • Published 2 years ago
scw-svg-captcha v1.0.3
下载
npm i scw-svg-captcha -S
使用
const http = require('http')
const svgCaptcha =require('scw-svg-captcha')
const server = http.createServer((req,res)=>{
let captcha = svgCaptcha.create()
res.setHeader("content-type", "image/svg+xml");
res.end(captcha.data)
})
server.listen(3000,()=>{
console.log('成功,http://localhost:3000')
})