bini-rust-server
v0.1.4
Published
Production server for Bini.js apps
Readme
⚡ bini-rust-server
Production server for Bini.js apps — Rust core, Node.js API runtime.
✨ Features
| | |
|---|---|
| 🚀 Blazing fast | Rust-powered static serving with Axum |
| 📁 File-based API routes | Drop .ts files in src/app/api/ — they just work |
| 🔧 Zero config | No build step for your backend code |
| 🌐 Production ready | Battle-tested for real-world deployments |
| 📦 Single binary | Easy distribution via npm — no Rust toolchain needed |
📦 Installation
# npm
npm install bini-rust-server --save-dev
# pnpm
pnpm add bini-rust-server -D
# yarn
yarn add bini-rust-server --dev🚀 Quick Start
1. Add to your package.json scripts:
{
"scripts": {
"start": "bini-rust-server"
}
}2. Run the server:
npm startThat's it. Your Rust server is running. 🎉
⚙️ Configuration
All configuration is done via environment variables — no config files needed.
| Variable | Description | Default |
|---|---|---|
| PORT | Server port | 3000 |
| BINI_DIST_DIR | Static files directory | dist/ |
| BINI_API_DIR | API routes directory | src/app/api |
| BINI_BODY_TIMEOUT_SECS | Request body read timeout | 30 |
| BINI_HANDLER_TIMEOUT_SECS | API handler timeout | 30 |
| BINI_BODY_SIZE_LIMIT | Max request body size | 10MB |
🖥 Supported Platforms
| Platform | Architecture | Status | |---|---|---| | Windows | x64 | ✅ | | macOS | x64 (Intel) | ✅ | | macOS | arm64 (Apple Silicon) | ✅ | | Linux | x64 | ✅ |
Pre-built binaries are bundled with the npm package. No Rust toolchain required.
📋 Requirements
- Node.js
>= 20 - No Rust toolchain needed — pre-built binaries are included
📄 License
MIT © Binidu01
