| src | ||
| .editorConfig | ||
| .gitignore | ||
| .yarnrc.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| package.json | ||
| README.md | ||
| yarn.lock | ||
Redirector
Simple redirection service. Runs on Node and uses Hono.
Can be adapted to run on Bun, Cloudflare Workers, or any other serverless platform.
Available as a Docker image.
Usage
yarn install
REDIRECT_URL=https://nzambello.dev PERMANENT=true yarn start
Then, open http://localhost:7878/ in your browser.
open http://localhost:7878
and you will be redirected to REDIRECT_URL from your env.
Configuration
It loads configuration from environment variables:
REDIRECT_URL: the url to redirect toPERMANENT: if true, it will return a 301 status code, otherwise 302
Docker compose example
version: "3.8"
services:
redirector:
image: nzambello/redirector:latest
environment:
- REDIRECT_URL=https://nzambello.dev
- PERMANENT=true
ports:
- 7878:7878