Skip to content

MHNahib/easy-captcha-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Captcha

A captcha generation tool built with Node.js and Canvas.

Want to check online? 🚀Live Link

Project Description:

Easy Captcha showcases the ability of Node.js to create captcha images, providing a straightforward and effective method to implement captcha functionality in web applications. Utilizing the Canvas library, this tool generates customizable captcha images to help prevent automated abuse and ensure security.

Installation

To install the project, follow these steps:

git clone https://github.com/MHNahib/easy-captcha-server.git
cd easy-captcha-server
npm install

Run Locally

Clone the project:

git clone https://github.com/MHNahib/easy-captcha-server.git

Navigate to the project directory:

cd easy-captcha-server

Install dependencies:

npm install

Start the server:

npm start

API Reference

Index

By hitting the root endpoint (/), the API returns a PNG image containing a captcha.

GET /

Example image:

captcha built from easy-captcha

Custom Text

You can provide your own text using a query parameter.

GET /?text=<YOUR_TEXT>

Example image:

For example, using c5Uop:

GET /?text=c5Uop

captcha built from easy-captcha

Note: The text cannot be more than 5 characters long. If it exceeds 5 characters, an error response is returned:

{
  "status": false,
  "data": {
    "captcha": "c5Uop55",
    "image": null
  },
  "message": "Text is too long!"
}

Base64 Response

You can get a JSON response with the text and image base64 string using a query parameter:

GET /?type=base64

Example image:

captcha built from easy-captcha

🚀 Author

@MHNahib

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors