mailcheck-backend
Lightweight rack-based API for email validation using Truemail, with CORS support for frontend apps.
251
Mail Check Backend is a lightweight, rack-based web API for email validation using the Truemail API. Built for simplicity and efficiency, it integrates seamlessly with frontend applications, providing fast and accurate email validation services.
To allow frontend applications to connect to the backend, CORS must be enabled. Below is the complete config.ru file with the necessary CORS settings:
# frozen_string_literal: true
require_relative 'config/loader'
require 'rack'
require 'rack/cors'
use Rack::Cors do
allow do
origins '*' # Replace '*' with specific domains if needed
resource '*',
headers: :any,
methods: [:get, :post, :options, :put, :delete],
expose: ['Authorization']
end
end
run TruemailServer::RackCascade
This configuration ensures secure communication between the backend and frontend, especially when hosted on different domains.
Pull the pre-built Docker image from Docker Hub:
docker pull prestonzen/mailcheck-backend
Run the container:
docker run -p 8080:8080 prestonzen/mailcheck-backend
Test the healthcheck:
curl http://localhost:8080/healthcheck
(Optional) If building locally, use the provided Dockerfile:
docker build -t mailcheck-backend:1.0 .
docker run -p 8080:8080 mailcheck-backend:1.0
Content type
Image
Digest
sha256:72f3715d7…
Size
49.4 MB
Last updated
over 1 year ago
docker pull prestonzen/mailcheck-backend