https://github.com/voxld/oxarionjs
Powerfull Backend Framework Build on top of BunJS
https://github.com/voxld/oxarionjs
backend backend-service bunjs framework javscript typescript webserver
Last synced: 8 months ago
JSON representation
Powerfull Backend Framework Build on top of BunJS
- Host: GitHub
- URL: https://github.com/voxld/oxarionjs
- Owner: VoxlD
- License: mit
- Created: 2025-07-19T02:36:39.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T23:24:18.000Z (8 months ago)
- Last Synced: 2025-08-09T12:51:43.285Z (8 months ago)
- Topics: backend, backend-service, bunjs, framework, javscript, typescript, webserver
- Language: TypeScript
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: LICENSE
Awesome Lists containing this project
README
# OxarionJS 🚀

**OxarionJS** is a powerful, modern, and lightweight backend framework built on top of [Bun](https://bun.sh), designed for speed, simplicity, and full TypeScript support.
---
## ⚡ Why OxarionJS?
- **Ultra Fast**: Built on Bun for maximum performance.
- **Lightweight**: Tiny footprint, just 48kb for the core modules.
- **TypeScript First**: Enjoy full type safety and modern development experience.
- **Expressive Routing**: Dynamic routes with parameters (`/user/[id]`, `/api/[...path]`).
- **Built-in Middleware**: CORS, JSON, URL-encoded, and more out of the box.
- **WebSocket Support**: Native, per-route WebSocket handlers.
- **Form Data & File Uploads**: Effortless form parsing and file handling.
- **Gzip Compression**: Automatic response compression.
- **Static File Serving**: Serve HTML and static assets with ease.
- **Bun Test Integration**: Write and run tests using Bun's test runner.
---
## 🚀 Getting Started
### 1. Prerequisite: Install Bun
OxarionJS requires [Bun](https://bun.sh) (v1.2.19 or higher).
If you don't have Bun installed, get it from [https://bun.sh](https://bun.sh).
### 2. Install OxarionJS
```bash
bun add oxarionjs
```
### 3. Create Your First Server
```typescript
import Oxarion, { Middleware } from "oxarionjs";
// Start the server
Oxarion.start({
port: 3000,
debugRoutes: true,
// Define your routes
httpHandler: (router) => {
router.addHandler("GET", "/", (_, res) => {
res.json({ message: "Welcome to Oxarion!" });
});
},
// This function is called after httpHandler is registered
safeMwRegister: (router) => {
router.middlewareChain(
"/",
[Middleware.cors(), Middleware.json(), Middleware.urlencoded()],
true // This means it will be applied to all routes
);
},
});
```
### 4. Run Your Server
```bash
bun run .ts
```
Replace `.ts` with the name of your main TypeScript file.
---
## 📝 Features Overview
- **Routing**: Dynamic, parameterized, and nested routes.
- **Middleware**: Plug-and-play CORS, JSON, URL-encoded, and custom middleware.
- **WebSocket**: Built-in, per-route WebSocket support.
- **Form Data**: Simple form parsing and file upload handling.
- **Compression**: Automatic gzip compression for responses.
- **Static Files**: Serve static files and HTML pages effortlessly.
- **Testing**: Integrated with Bun's test runner for robust testing.
---
## 📦 Requirements
- **Bun**: v1.2.19 or higher
[Install Bun →](https://bun.sh)
---
## 📄 License
[MIT](./LICENSE)
---
> **Need help or want to contribute?**
> Check out the [issues](https://github.com/VoxlD/OxarionJs/issues) or open a pull request!