Skip to content
mirtlecnPublic

About

Redis based lightweight file, text & URL sharing API. Vercel compatible

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Logo

Go version API server | CLI client | Skills for AI Agents

Post: Redis Based Lightweight CMS and Content Sharing API Service

Web UI

Available at http://localhost:3000/admin.

Web UI Screenshot

HTTP API

Suggested shell variables:

export POST_BASE_URL="https://example.com"
export POST_TOKEN="your-secret-key"

# Create a new content item
curl -H "Authorization: Bearer $POST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"note","url":"hello","type":"text"}' \
  "$POST_BASE_URL/create"

# Query the content item
curl -H "Authorization: Bearer $POST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"note"}' \
  "$POST_BASE_URL/query"

# Overwrite the content item
curl -H "Authorization: Bearer $POST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"note","url":"updated","type":"text"}' \
  "$POST_BASE_URL/update"

# Remove the content item
curl -H "Authorization: Bearer $POST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"note"}' \
  "$POST_BASE_URL/delete"

For details, see API documentation

CLI client

CLI client

Deploy

Local

Prerequisites:

  • Node.js 24+
  • Redis (a valid Redis URL. Get a free one at https://redis.com/)
  • S3-compatible storage (Required for file uploads)
npm install
cp .env.example .env.local
npm start

Vercel

Deploy with Vercel

Required:

  • LINKS_REDIS_URL : 'redis://...' or 'rediss://...' URL for Redis connection
  • SECRET_KEY : API token
  • ADMIN_KEY : Password for admin GUI login
  • BASE_DOMAIN : Optional public domain for generated links, for example www.example.com
  • FOOTER : Optional base64-encoded HTML footer for rendered Markdown pages. Invalid base64 or blank decoded HTML is ignored.

EdgeOne Pages

Same as Vercel.

Test

  • npm test: runs the full local regression chain: unit tests, local admin/web smoke, and local API smoke.
  • npm run test:unit: runs only the Node unit test suite.
  • npm run test:smoke: runs the two local smoke suites without unit tests.
  • npm run test:vercel: runs the Vercel smoke suite with vercel dev. It is intentionally separate from the local regression chain.

Credits

MIT Licence

About

Redis based lightweight file, text & URL sharing API. Vercel compatible

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages