jurisv / nodejs.extdirect

Ext.Direct connector for node.js (npm module)
41 stars 16 forks source link

Sencha Ext.Direct connector for node.js

Important: Version 2.0.0 and up is not compatible with previous 1.x branch

Compatibility:

Example code

Sample applications for Touch and Ext JS can be found here: https://github.com/jurisv/extdirect.examples

Official Sencha example (using Ext JS 6.5) can be found here: https://github.com/sencha-extjs-examples/Coworkee

Ext JS:

* Application structure with API provider
* Grid CRUD Master-detail
* Cookie / Session
* Direct method call, shows regular call and onw that has hard exception (syntax error)
* Form Load / Submit
* Form file upload (Cross domain upload is not supported!)
* Tree root / child dynamic load
* Metadata (Starting from Ext JS 5)
* Namespaces (From 4.2)

Sencha Touch:

* Application structure with API provider
* List read using directFn
* Form load / submit

Usage

For usage please refer to Examples.

Configuration description:

{
    "ES6": false, // Support method discovery without `function` keyword.  
    "rootNamespace": "Server", // Namespace in which server will be accessible from client side
    "apiName": "API", // API name
    "apiUrl": "/directapi", // URL to retrieve API configuration
    "classRouteUrl": "/direct", // URL to call Direct methods
    "classPath": "/direct", // Direct class location in filesystem relative to the server directory
    "server": "localhost", // Hosting server name
    "port": "3000", // Hosting server port
    "protocol": "http", // http | https
    "timeout": 30000, // Operation timeout
    "cacheAPI": false, // Set true to cache API's for production. During development setting to false will allow to make any changes and access API's without server reload.
    "relativeUrl": false, // Use relative URL's
    "appendRequestResponseObjects": true, // If true, will append req and res objects to method call
    "enableMetadata": true, // Metadata support
    "responseHelper": true, // Automatically append success true|false
    "enableProcessors": true //Enable Helpers to have methods before and after API discovery as well as before and after Transaction batch
}

Changelog: