An Easy to use captcha for your website. Modern solution for bot problem. There are many people to use captcha for bot problem. I found out it somewhere and taken inspiration from it.
To use this captcha run
npm i captcha-at-ease
After installation, go to file where you want to deploy it
const { useCaptcha } = require('captcha-at-ease');
const { html, css, js } = useCaptcha();
Sample index.js File
First install dependencies
npm i express
npm i captcha-at-ease
Install dependencies
// index.js
const express = require('express');
const path = require('path');
const { useCaptcha } = require('captcha-at-ease');
const app = express();
const { html, css, js } = useCaptcha();
app.get('/', (req, res) => {
res.sendFile(html);
});
app.get('/style.css', (req, res) => {
res.sendFile(css);
});
app.get('/script.js', (req, res) => {
res.sendFile(js);
});
const port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});
Start the server
node filename.js