a tiny metadata retriever with metascraper
- Launch server.
- Request to server with site URL in
urlparameter.
$ curl https://your-metacog-server/?url=https://github.com
returns
{
"audio": null,
"author": null,
"date": "2026-01-01T00:00:00.000Z",
"description": "Join the world’s most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
"feed": null,
"iframe": null,
"image": "https://images.ctfassets.net/8aevphvgewt8/4pe4eOtUJ0ARpZRE4fNekf/f52b1f9c52f059a33170229883731ed0/GH-Homepage-Universe-img.png",
"lang": "en",
"logo": "https://github.com/fluidicon.png",
"publisher": "GitHub",
"title": "GitHub · Change is constant. GitHub keeps you ahead.",
"url": "https://github.com/",
"video": null
}- Requirements
- Node.js 24.x
- npm@11
$ npm i
$ npm run dev- Requirements
- Docker Desktop or equivalent
$ docker compose up$ docker build .environment variables:
PORT- Port to expose app
- if undefined, 3000
REDIS_URL- Redis/Valkey host for caching
- if undefined, memory cache is used
REDIS_TIMEOUT- Redis command timeout
- in millisecond
ALLOWED_ORIGIN- Allowed origins for CORS
- Write in space-delimited regular expressions
Access-Control-Allow-Origin- set blank for
Access-Control-Allow-Origin: *
CACHE_TTL- Cache retention period for fetched data
- in seconds
- if undefined, 24hour
CACHE_CHECK- Effective only with memory cache
- Cache expiration check interval
- in seconds
EXPOSE_VERSION- Whether to expose the
/versionendpoint - Set to any non-empty value to enable the endpoint
- if undefined or empty, endpoint is disabled
- Whether to expose the
Deploy to Render
Render Blueprints (IaC) – Render Docs
- Set up your account
- Edit render.yaml
- Commit & push
- Apply it in Render dashboard
Deploy to Fly.io
- Set up your account & app & cli
$ flyctl redis create(if you use Redis)$ cp sample.fly.toml fly.toml- Enter your app name in
fly.toml $ npm run deploy