DChisel 是一個輕量級的 Dart Web 框架,專為建立 REST APIs 而設計。它提供對 MySQL 和 PostgreSQL ORM 的內建支援,實現無縫的資料庫互動。此框架允許開發者實作自訂中間件來處理請求與路由邏輯。著重於簡潔性與效能,DChisel 非常適合需要結構化 API 開發與資料庫整合的後端服務。它運行在 Dart 上,適用於針對 Web 環境的伺服器端應用程式。
適用情境
建構 RESTful API
基於資料庫的後端服務
基於中介軟體的請求處理
伺服器端 Dart 應用程式
與 MySQL/PostgreSQL 集成的 API
主要特色
自定義中間件支援
MySQL 與 PostgreSQL ORM
輕量且快速
簡單的 REST API 結構
Dart 原生的伺服器端執行
適合對象
使用 Dart 的後端開發人員
構建以 API 為首的應用程式團隊
需要資料庫 ORM 的專案
Web 伺服器,開銷極小
尋求簡單伺服器框架的開發者
使用建議
有限的平台支援(不支援行動裝置或桌面端)
無內建驗證
複雜設定需要手動設定
不適合用於UI密集型應用
依賴社群維護
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
DChisel Dart Framework
DChisel is simple Dart Framework for creating REST API
Features
Custom host server and port
GET, POST, PUT, DELETE, PATCH Routes
ORM CRUD to PostgreSQL
ORM CRUD to MySQL
Global Middleware
Specific Route Middleware
Auth
Base Response Ok & Forbidden
Header CORS
Base64 decode to File
Hotreload
Usage
To add the dchisel to your Dart application read the install instructions.
For now, DChisel only support PostgreSQL and MySQL
DB Config
DChiselDB().configDB('dialect', // DIALECT DATABASE, IF YOU USE POSTGRESQL CHANGE 'dialect' to 'postgre', IF YOU USE MYSQL CHANGE 'dialect' to 'mysql'
host: 'your_host',
db: 'your_db_name',
port: your_port, //integer
username: 'your_db_username',
password: 'your_db_password');
Please file any issues, bugs or feature requests as an issue on our GitHub page. Commercial support is available, you can contact us at <alphacsoft@gmail.com>.
Want to contribute
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
Author
This dchisel framework for Dart is developed by Alphacsoft.