https://github.com/fb-sean/font-server
A simple font server for serving fonts to the web.
https://github.com/fb-sean/font-server
Last synced: about 1 month ago
JSON representation
A simple font server for serving fonts to the web.
- Host: GitHub
- URL: https://github.com/fb-sean/font-server
- Owner: fb-sean
- License: agpl-3.0
- Created: 2025-04-13T10:54:57.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-04-13T11:40:23.000Z (about 1 month ago)
- Last Synced: 2025-04-13T12:23:40.948Z (about 1 month ago)
- Language: TypeScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📁 Font Server
A blazing fast, minimal font server built with raw `node:http` and `axios`.
Includes a smart TypeScript **Google Fonts Proxy** with caching and support for **Hetzner Storage Box** (currently WIP).---
## ✨ Features
- ⚡️ Pure Node.js – no frameworks, just `node:http`
- 🧠 Google Fonts Proxy – downloads fonts on-demand and caches them locally
- 💾 File Cache – serve files instantly if already cached
- ☁️ Hetzner Storage Box integration (planned, currently not working)
- 🛠 Built with TypeScript---
## 🔧 Setup
### Build
```bash
npm run build
```### Run
```bash
npm run start
```### Replace
```css
src: url(https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
```**=>**
```css
src: url(https://example.com/fetch/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
```### OR
```html
```
---
## 🌐 Google Fonts Proxy
Send a request like:
```
GET /fetch/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2
```The server will:
1. Check if the font is cached
2. If not, download it from Google Fonts
3. Store it locally
4. Serve it from the local cache next time 🚀---
## 📦 Hetzner Storage Box (WIP)
There's built-in code to store files in a Hetzner Storage Box.
Currently **not active** due to connection/auth issues, contributions welcome!---
## 🤝 Contributions
Contributions are welcome!
Feel free to open issues, suggest features or submit PRs.---
## 💬 Contact
Have questions or ideas?
Open an issue or ping me!