express-gateway icon indicating copy to clipboard operation
express-gateway copied to clipboard

Policy Creation

Open neerajnegidev opened this issue 6 years ago • 2 comments

is there any way to create own policy and put it source code inside root directory e.g. inside express-gateway/policy? How to register policy from root location of project. As per documentation it will be done through manifest.js init function, but i am not able to see manifest.js file anywhere.

neerajnegidev avatar Jan 12 '20 02:01 neerajnegidev

@neerajnegidev you need a plugin for that. for more information please go to this link- https://www.express-gateway.io/docs/plugins/plugin-development/#example-plugin-package-overview

MohammadWasi avatar Jan 13 '20 11:01 MohammadWasi

I'm a bit confused about this. Does this imply that it is not possible to apply a policy as custom middleware ( like you would with a regular Express application) without explicitly writing an external plugin and registering it?

Edit: Never mind, found the answer here: https://www.express-gateway.io/docs/plugins/

The plugin framework enables anyone to take Express middleware and integrate them into Express Gateway as plugins. Express Gateway provides a declarative way to take advantage of Express middleware to be driven centrally and executed dynamically.

code-angels avatar May 22 '20 11:05 code-angels