rusty
v0.3.3
Published
captcha for nodejs
Downloads
24
Readme
rusty
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'
}))