Core engine for Apigee Edge Microgateway
We have provided some default middleware that you can use in the microgateway-plugin repo.
``javascript``
const config = require('microgateway-config');
config.init({source:'
const Gateway = require('microgateway-core');
const plugin = {
init:(config,logging,stats)=>{
return {
onrequest:(req,res,options,cb) => {
cb();
}
}
}
}
config.get({source:'same.yaml',keys:{key: '', secret: ''}},(err,config)=>{
const gateway = Gateway(config);
gateway.addPlugin('my-plugin', plugin.init);
gateway.start((server)=>{
});
});