From fdb6fcd9fbcafacb252492bbec55c9dc13db1e8e Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Mon, 28 May 2018 23:47:15 +0200 Subject: [PATCH] docs: update dev plugins --- docs/dev-plugins.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/dev-plugins.md b/docs/dev-plugins.md index e14c4145f..4304c6127 100644 --- a/docs/dev-plugins.md +++ b/docs/dev-plugins.md @@ -80,14 +80,16 @@ Where `htpasswd` is the sufix of the plugin name. eg: `verdaccio-htpasswd` and t ## Middleware Plugin -Middleware plugins have the capability to modify the API layer, either adding new endpoints or intercepting requests. A pretty good example -of middleware plugin is the [sinopia-github-oauth](https://github.com/soundtrackyourbrand/sinopia-github-oauth) compatible with `verdaccio`. +Middleware plugins have the capability to modify the API layer, either adding new endpoints or intercepting requests. + +> A pretty good example +of middleware plugin is the [sinopia-github-oauth](https://github.com/soundtrackyourbrand/sinopia-github-oauth) and [verdaccio-audit](https://github.com/verdaccio/verdaccio-audit). ### API ```js -function register_middlewares(expressApp, auth, storage) { - ...more stuff +function register_middlewares(expressApp, authInstance, storageInstance) { + /* more stuff */ } ``` @@ -97,7 +99,7 @@ To register a middleware we need an object with a single method called `register ## Storage Plugin -Since `verdaccio@3.x` we also can plug a custom storage. +Verdaccio by default uses a file system storage plugin [local-storage](https://github.com/verdaccio/local-storage) but, since `verdaccio@3.x` you can plug in a custom storage. ### API