@restforge357/restforge
v1.13.8
Published
Declarative backend engine that transforms JSON configuration into production-ready REST API server. Supports PostgreSQL, Oracle, and MySQL.
Maintainers
Readme
RESTForge Runtime
Declarative backend engine yang mengubah konfigurasi JSON menjadi production-ready REST API server. Mendukung PostgreSQL, Oracle, MySQL, cluster mode, Kafka consumer, dan Excel import/export.
Fitur Utama
- Multi-Database — PostgreSQL, Oracle, MySQL dengan connection pooling
- Cluster Mode — Multi-core CPU support dengan auto-restart worker
- Built-in CRUD — DataTables pagination, search, sorting, lookup, dan read
- Kafka Consumer — Message processing dari Kafka topics
- Excel Import/Export — Built-in handlers untuk data import dan export
- Redis Caching — Cache layer untuk optimasi performa
- License Management — Built-in license activation dan validation
- Structured Logging — Request logging dengan pino
Instalasi
npm install @restforge357/restforgeVerifikasi instalasi:
npx restforge --helpPersyaratan
- Node.js >= 22.0.0
- Database — PostgreSQL >= 12.0, Oracle >= 11g, atau MySQL >= 5.7
- Generated Modules — Digenerate menggunakan RESTForge CLI (
@restforge357/restforge-cli)
Panduan Cepat
1. Setup Project
mkdir my-api-project && cd my-api-project
npm init -y
npm install @restforge357/restforge2. Konfigurasi Database
Buat file config/mydb.env:
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=your_database
DB_SCHEMA=public3. Generate Module
Module digenerate menggunakan RESTForge CLI (package terpisah):
npx restforge-cli create --project=myapp --endpoint=users --payload=users.json4. Jalankan Server
# Single instance
npx restforge --project=myapp --port=3000 --config=mydb.env
# Cluster mode
npx restforge --project=myapp --port=3000 --config=mydb.env --cluster5. Test API
curl http://localhost:3000/api/myapp/healthLicense
Proprietary - All rights reserved.
