服务端插件: svg-captcha
    文档地址:https://github.com/produck/svg-captcha/blob/1.x/README_CN.md

    1. const express = require('express');
    2. const router = express.Router();
    3. // 验证码
    4. const svgCaptcha = require('svg-captcha');
    5. router.get('/', (req, res, next) => {
    6. const capthcha = svgCaptcha.create({
    7. ignoreChars: 'Oo01liI',
    8. noise: 20,
    9. color: true,
    10. });
    11. console.log(capthcha);
    12. res.type('svg');
    13. res.status(200).send(capthcha.data);
    14. });
    15. module.exports = router;