Newton's Programmatic Measurements
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

rusty

0.3.3 • Public • Published

rusty

NPM Version

captcha for nodejs, in pure js

var rusty = require("rusty")
 
app.use("/captcha.png", rusty.middlware())
 
app.post("/login", rusty.verifyCaptcha, function(req, res) {
    if(req.verifyCaptcha(req.body.captcha)) {
        // human here
    }
});

options

app.use("/captcha.png", rusty.middlware({
    width: 120,
    height: 50,
    background: '#ffffff',
    color: '#888888',
    chars: 'abcdefghijklmnopqrstuvwxyz0123456789',
    length: 4,
    fonts: [['name', 20, 'path/to/font.ttf']],
    session: 'captcha'
}))

Keywords

install

npm i rusty

Downloadsweekly downloads

0

version

0.3.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability