captcha-api

πŸ”’ An API for generating CAPTCHAs from scratch (Node.js)

MIT License

Stars
3

CAPTCHA API

My blog post: Let's Build a CAPTCHA Generator with Node.js

πŸ”’ Keep those nasty bots out with a home-grown CAPTCHA!

Install

npm i

Run

npm start

API

All routes default to 200x100 size unless specified.

  • /test/:width?/:height?/

    • Get a web page with an image element to manually test the API.
  • /captcha/:width?/:height?/

    • Get a CAPTCHA object for proper usage.
    • { "image": <data url>, "text": <validation text> }

Test

Uses Jest to run integration tests.

npm test

n.b. CAPTCHAs are not accessible and in some cases not even effective.

Related Projects