nexa-bun
v0.6.2
Published
Nexa — Production backend framework for Node.js. One resource → REST API, ORM, auth, queue, and admin panel. Zero native build (Hostinger / Windows friendly).
Downloads
142
Maintainers
Readme
Nexa
تكتب قليل → يصير مشروع كامل. الهدف: ساعات بدل أسابيع.
يعمل على Node.js ≥ 20 (مناسب لـ Hostinger وباقي الاستضافات الشائعة).
npm install عادي — بدون Visual Studio / node-gyp (SQLite عبر sql.js).
ابدأ
npm install -g nexa-bun
# أو محلياً:
npm add nexa-bun
npx nexa new my-app
cd my-app
npm install
npm run serve→ http://localhost:3333 (صفحة الترحيب)
→ http://localhost:3333/admin
→ [email protected] / 123456
كل الفكرة
import { resource, string, money, belongsTo, select } from "nexa-bun";
resource("orders", {
client: belongsTo("clients").required().label("العميل"),
total: money().required().label("المبلغ"),
status: select(["جديد", "مدفوع"]).label("الحالة"),
}, { label: "الطلبات" }).admin();هذا يعطيك: جدول + REST API + لوحة تحكم.
قوة إضافية (اختياري):
await db.from("orders").where("status", "مدفوع").with("client").get();أوامر
| الأمر | ماذا يفعل |
|--------|-----------|
| nexa serve | تشغيل |
| nexa new X | مشروع جديد |
| nexa make:resource X | جدول في resources/ (تلقائي) |
Hostinger
استخدم MySQL من لوحة الاستضافة:
DATABASE_URL=mysql://user:pass@localhost:3306/dbname
APP_SECRET=strong-secret-at-least-32-chars
NODE_ENV=productionتوثيق
- docs/START.md ← ابدأ من هنا
- docs/REFERENCE.md ← مرجع API كامل
- بعد التشغيل: http://localhost:3333/docs
باكند كامل على Node.js — من فكرة إلى مشروع جاهز بسرعة.
