plugdo-node
A module that implements plugdo-platform
web software architecture. It help you focus in the implementation of integration oriented programming for: integration, data transformation, in-memory solutions and realtime solutions. you must purchase the connectors available in ower website.
Compatibility: Node.js version 6+ and Express version 4+
Install with npm
:
npm install plugdo-node
Integrations
The integration core platform creates a global message in JSON format. The message is passed from the plugdo-server platform to the integration component implemented by you. An example:
plugdo;
This example shows the following details:
1- message: the message parameter is a global object that includes the following information in JSON format (the example is in XML format for better understanding).
http api/get-customer/xml localhost:3000 http://localhost:3000/api/get-customer/xml api get-customer xml 127.0.0.1 localhost:3000 keep-alive 1 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 gzip, deflate, br en-US,en;q=0.9,es;q=0.8 io=Kli44tnwwnR7jIbJAAAB desktop
2- send: the send parameter is a function, it must be used to end a process of the integration implemented. You can pass the function throught the different callbacks, unless you execute it, the request will stay pending. Take care with the error handling logic, because if a try/catch is in place, you must execute the send({}, error)
to exit the current request.
3- The "get-customer"
is the name for the integration access point used in the URL.
The expected URL will be:
http://domain.com/api/gwt-customer/xml
or
http://domain.com/api/gwt-customer/json
the following example shows a complex logic with multiple collectors:
plugdo;
Collectors
We are not including connectors, you must purchase the connectors in ower website or create it.
// Without callbackconst myConnector = callback: false options: setting1: "" setting2: "" { }; // With callbackconst myConnector = callback: true options: setting1: "" setting2: "" { // Error ; // Success ; }; // How to register a connector to be used in the framework// plugdo.registerConnector("type", "action", myConnector); // Add databasesplugdo;plugdo;plugdo;
How to use it?
Create a index.js or main.js file. The file simple example is:
const plugdo = ;const path = ; // Register the connectors here!const myDatabaseConnector = ;plugdo; plugdostart80 path;
Now you can follow the plugdo™ MVC and Server documentation https://docs.plugdo.com/#plugdo-node-mvc