Skip to content

A simple Node.js Express server providing an API endpoint for Optical Character Recognition (OCR) using Tesseract.js.

Notifications You must be signed in to change notification settings

Aaleen110/ocr-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 OCR Service – Node.js + Tesseract.js

This project implements an OCR (Optical Character Recognition) service using a Node.js and Express backend. It provides a simple, RESTful API to extract text from image files using the Tesseract.js library.


πŸš€ Features

  • πŸ“‘ REST API: Exposes a POST /ocr endpoint to handle OCR tasks and a GET / endpoint for health checks.
  • 🧠 Tesseract.js Powered: Uses the powerful Tesseract OCR engine for text recognition (defaults to English).
  • πŸ“· Image Upload: Handles multipart/form-data image uploads using multer. The image is processed directly from memory.
  • βš™οΈ Express Framework: Built with Express.js for easy setup and routing.
  • 🌐 CORS Enabled: Includes CORS middleware to support cross-origin requests.
  • πŸ” Environment Config: Loads config (e.g., PORT) from a .env file using dotenv.
  • ⚑ Async/Await: Fully asynchronous, non-blocking operations.
  • 🚨 Error Handling: Middleware for clean error responses and server stability.

πŸ“¦ Installation

git clone https://github.com/Aaleen110/ocr-service.git
cd ocr-service
npm install

About

A simple Node.js Express server providing an API endpoint for Optical Character Recognition (OCR) using Tesseract.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published