Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

microgateway-core

Package Overview
Dependencies
Maintainers
0
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microgateway-core

Core engine for Apigee Edge Microgateway

  • 3.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
476
increased by35.61%
Maintainers
0
Weekly downloads
 
Created
Source

Microgateway-Core

Microgateway-core is a pass through api proxy that events to plugin middleware. The plugin middleware can implement a variety of functions like oauth, spikearrest, and quotas on your apis.

We have provided some default middleware that you can use in the microgateway-plugin repo.

Usage

To use microgateway-core you must initialize microgateway with a config. The config can be instantiated using the microgateway-config repo.

const config = require('microgateway-config');
config.init({source:'<somepath.to.a.yaml.file>', targetDir:'<path.to.write.new.config>', targetFile:'<file.name.of.new.config>'});
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)=>{
	});
});

More info

For more info on usage we use the microgateway-core to power our microgateway product. We use a command line utility here. https://github.com/apigee/microgateway-cli

FAQs

Package last updated on 06 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc