| 1 |
## Using this Example |
| 2 |
|
| 3 |
[This](example.go) is a simple HTTP server which creates the reCaptcha form and tests the input. |
| 4 |
|
| 5 |
Build the example after installing the recaptcha package: |
| 6 |
|
| 7 |
``` |
| 8 |
go get github.com/dpapathanasiou/go-recaptcha |
| 9 |
cd $GOPATH/src/github.com/dpapathanasiou/go-recaptcha/example |
| 10 |
go build example.go |
| 11 |
``` |
| 12 |
|
| 13 |
Run the server<sup>*</sup> by invoking the executable: |
| 14 |
|
| 15 |
``` |
| 16 |
./example <reCaptcha public key (aka Site key)> <reCaptcha private key (aka Secret key)> |
| 17 |
``` |
| 18 |
|
| 19 |
You can access the page from http://localhost:9001/ in your browser. |
| 20 |
|
| 21 |
For more information on client side setup and other configuration options, check the [official documentation](https://developers.google.com/recaptcha/intro). |
| 22 |
|
| 23 |
<sup>*</sup> make sure ['localhost' is added to the list of domains allowed](https://developers.google.com/recaptcha/docs/domain_validation) for the site registered at reCaptcha. |