Is it possible to connect to a external MySQL from Apigee edge oncloud. not the apigee127.
Requirement is to perform basic CRUD operations in the database.
Checked the volos-connector and mssql connectors but i not able to understand how we are gona install the volos-sql module ?
how can we install the volos module on cloud machine if possible and then we can use that connector ?
@mshar180 The volos modules are available via npm. You could write a node app which makes use of the volos-mysql npm module and upload that to Apigee Edge. The volos-mysql module let's you map sql queries to your database as simple REST APIs.
For example, you could do something like this:
var mysqlConnector = require('volos-mysql'); var http = require('http'); var restMap = require('./queryToRestMap'); var profile = { user: 'volos', password: 'volos', host: "nsa.rds.amazon.com", port: "5432" }; var mysqlConnectorObject = new mysqlConnector.MySqlConnector({"profile": profile, "restMap": restMap}); var svr = http.createServer(function (req, resp) { mysqlConnectorObject.dispatchRequest(req, resp); }); svr.listen(9089, function () { mysqlConnectorObject.initializePaths(restMap); console.log(mysqlConnectorObject.applicationName + ' node server is listening'); });
For more details please refer to the volos-mysql module: https://www.npmjs.com/package/volos-mysql