A minimalist and fast URL shortening API built with Bun and Elysia.js. Supports local development with SQLite and cloud-scale production using Azure Table Storage.
- Bun – JavaScript runtime (v1.0+)
- Docker – For containerized builds
- Azure Storage Account – For cloud data persistence (Azure Table Storage)
To build and run the app in a container:
docker build -t tinyit-api .
docker run -p 3000:3000 \
-e NODE_ENV=production \
-e AZURE_CONN_STRING="<your_connection_string>" \
-e AZURE_TABLE_NAME="<your_table_name>" \
-e AZURE_PARTITION_KEY="<your_partition_key>" \
tinyit-api
⚠️ Replace the environment variables with your Azure credentials.
Install dependencies and run the server:
bun install
bun run devTo run using Azure Table Storage, set up a .env file:
ENV=production
AZURE_CONN_STRING=UseDevelopmentStorage=true;
AZURE_TABLE_NAME=<your_table_name>
AZURE_PARTITION_KEY=<your_partition_key>Creates a shortened URL.
{
"url": "https://example.com"
}{
"id": "abc123",
"url": "https://example.com"
}Redirects to the original URL for the given short ID.
{
"url": "https://example.com"
}MIT © 2025 Oneiro Contributors