re-captcha
recaptcha renders and verifies Recaptcha captchas.
Installation
Via npm:
npm install re-captcha
Setup
Before you can use this module, you must visit http://www.google.com/recaptcha to request a public and private API key for your domain.
Customizing the Recaptcha
See these instructions for help customizing the look of Recaptcha. In brief, you will need to add a structure like the following before the form in your document:
<script>
var RecaptchaOptions = {
theme: 'clean',
lang: 'en'
};
</script>
Example Using Connect/Express
app.js:
var express = ;var Recaptcha = ; var PUBLIC_KEY = 'YOUR_PUBLIC_KEY';var PRIVATE_KEY = 'YOUR_PRIVATE_KEY';var recaptcha = PUBLIC_KEY PRIVATE_KEY; var app = ;app;app; app; http;
views/form.html:
<%-recaptcha_form%>
Make sure connect and EJS are installed, then:
$ node app.js