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'
}))

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i rusty

    Weekly Downloads

    0

    Version

    0.3.3

    License

    MIT

    Last publish

    Collaborators

    • zf