https://github.com/xcfio/url-shortener
A Modern URL Shortener built with Fastify 5, TypeScript 5, and Node.js 24
https://github.com/xcfio/url-shortener
backend expressjs netlify nodejs postgres postgresql typescript url-shortener
Last synced: 3 months ago
JSON representation
A Modern URL Shortener built with Fastify 5, TypeScript 5, and Node.js 24
- Host: GitHub
- URL: https://github.com/xcfio/url-shortener
- Owner: xcfio
- License: apache-2.0
- Created: 2024-06-29T03:09:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-12T14:20:22.000Z (6 months ago)
- Last Synced: 2025-12-14T05:37:15.563Z (6 months ago)
- Topics: backend, expressjs, netlify, nodejs, postgres, postgresql, typescript, url-shortener
- Language: JSON
- Homepage:
- Size: 3.43 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL Shortener
[](https://github.com/xcfio/url-shortener/actions/workflows/test.yaml)
[](https://nodejs.org/)
[](https://opensource.org/license/apache-2-0)
[](https://www.fastify.io/)
[](https://www.typescriptlang.org/)
[](https://pnpm.io/)
[](https://www.patreon.com/xcfio)
[](https://wakatime.com/badge/user/80f5dbf4-7bff-4748-82c6-2a8a3f3ec1c0/project/cb1a189c-ab43-4c79-9445-88fbd40793d4)
A simple and fast URL shortening service built with Fastify.
## Features
- Quick URL shortening
- Rate limiting (20 requests per minute)
- Simple and clean UI
- URL blacklist support
## Installation
```bash
# Install dependencies
pnpm install
```
## Environment Variables
Copy `.env.example` to `.env` and configure:
```bash
# Server configuration
PORT=3000 # Optional, defaults to 3000
```
## Development
```bash
# Start development server
pnpm dev
```
## Production
```bash
# Build the project
pnpm build
# Start production server
pnpm start
```
## API Endpoints
- `GET /` - Web interface
- `POST /` - Create shortened URL
- `GET /:code` - Redirect to original URL
- `GET /status` - API health check
## License
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for more information.