पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.1.0+13

dchisel

एक सरल डार्ट वेब फ्रेमवर्क जो आरईएसटी एपीआई बनाने के लिए है। DChisel कस्टम मिडलवेयर और MySQL & PostgreSQL ORM का समर्थन करता है।

30-दिन डाउनलोड
11
लाइक
46
Pub अंक
80

पैकेज इंस्टॉल करें

flutter pub add dchisel

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

DChisel एक हल्का डार्ट वेब फ्रेमवर्क है जिसका उपयोग रेस्ट एपीआई के निर्माण के लिए किया जाता है। इसमें माइक्रोसॉफ्ट और पोस्टग्रेस के लिए आंतरिक समर्थन है, जिससे डेटाबेस इंटरैक्शन आसान हो जाता है। फ्रेमवर्क विकासकर्ताओं को अनुकूल मध्यवर्ती सॉफ्टवेयर के लिए अनुकूल अनुकूलन करने की अनुमति देता है। सरलता और प्रदर्शन पर ध्यान केंद्रित करते हुए, DChisel संरचित एपीआई विकास और डेटाबेस एकीकरण के साथ बैकएंड सेवाओं के लिए उपयुक्त है। यह डार्ट पर चलता है और वेब वातावरण के लिए सर्वर-साइड एप्लिकेशन के लिए उपयुक्त है।

उपयोग

  • RESTful APIs का निर्माण
  • डेटाबेस-आधारित बैकएंड सेवाएं
  • मध्यस्थ-आधारित अनुरोध प्रक्रिया
  • सर्वर-साइड डार्ट एप्लिकेशन्स
  • MySQL/PostgreSQL एकीकरण के साथ APIs

मुख्य विशेषताएँ

  • कस्टम मिडलवेयर समर्थन
  • MySQL और PostgreSQL ORM
  • हल्का और तेज़
  • सरल REST API संरचना
  • डार्ट-नेटिव सर्वर-साइड एक्जीक्यूशन

इनके लिए उपयुक्त

  • Dart का उपयोग करने वाले बैकएंड विकासकर्मी
  • API-पहले एप्लिकेशन बनाने वाली टीमें
  • डेटाबेस ORM की आवश्यकता वाले प्रोजेक्ट
  • न्यूनतम ओवरहेड वाले वेब सर्वर
  • सरल सर्वर फ्रेमवर्क की तलाश में विकासकर्ता

विचार योग्य बातें

  • सीमित प्लेटफॉर्म समर्थन (मोबाइल या डेस्कटॉप के लिए नहीं)
  • कोई निर्मित प्रमाणीकरण नहीं है
  • जटिल सेटअप के लिए हाथ से कॉन्फ़िगर करना आवश्यक है
  • यूआई-भारी एप्लिकेशन्स के लिए उपयुक्त नहीं
  • समुदाय द्वारा रखरखाव पर निर्भर

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Dchisel Logo

DChisel Dart Framework

DChisel is simple Dart Framework for creating REST API

pub package

English Documentation Indonesia Documentation

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.

Host Server

Default host is "localhost" and port 8000

import 'package:dchisel/dchisel.dart';

Future<void> main(List<String> arguments) async {
  DRoute route() {
    var droute = DRoute();
    droute.get('/', (Request req) async => resOk("Hello, DChisel"));
    return droute;
  }
  DChisel().serve(getroutes: route());
}

If you want to change the host to 0.0.0.0 and port to 5555 you can use :

 DChisel().serve(getroutes: route(), serverHost: '0.0.0.0', serverPort: 5555);
GET Route
droute.get('/hello', (Request request) {
    return 'Hello, World';
});

GET with param you can use :

droute.get('/getparam/<name>', (Request request, String name) {
    return 'Hello, $name';
});
POST Route
droute.post('/hello', (Request request) async {
    return 'Hello, World';
});

If you want to get Body value from your POST request, use :

var body = await request.body.asJson;

If you want to get Header value from your POST request, use :

var headers = await request.headers;
PUT Route
droute.put('/hello/<name>', (Request request, String name) async {
  return 'Hello, $name';
});

PUT also can get Header and Body request

var headers = await request.headers;
var body = await request.body.asJson;
DELETE Route
droute.delete('/hello/<name>', (Request request, String name) async {
  return 'Hello, $name';
});

Dchisel ORM

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');
Get All Data
DChiselDB().getAll('your_table_name');
Get Data With Custom Column and Filter
DChiselDB().getOption('your_table_name', 
    column: 'your_column1,your_column2', 
    where: ['your_column_name', 'your_filter_value']);

If you want filter contains, just add % into your filter value, example :

'%your_filter_value%'
Create Data
DChiselDB().create('users', data: {
    'your_column_name': 'your_value'
});
Update Data
DChiselDB().update('users', data: {
    'your_column_name': 'your_value'
}, where: ['your_filter_column_name', 'your_filter_value']);
Delete Data
DChiselDB().deleteAll('your_table_name');
Delete Data Custom Filter
DChiselDB().deleteOption('your_table_name', where: ['your_filter_column_name', 'your_filter_value']);

Issues

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.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 14 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।