From 1e036d385df9d5f406e992e1118ec57ff0057c91 Mon Sep 17 00:00:00 2001 From: Dorian Boulc'h Date: Sun, 14 Oct 2018 22:19:00 +0200 Subject: [PATCH] Add an example to the README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 6dc0efd..a430f94 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # nodegistry Docker Registry Remote API module. + +## Example +Get the manifest of an image stored on a private registry. +```javascript +const Registry = require('nodegistry'); + +let registry = new Registry({ + credentials: { + user: 'yourUsername', + pass: 'yourPassword' + }, + url: 'https://repository.yourcompany.com/v2', +}); + +let manifest = await registry.getRepository('mariadb').getManifest('10'); +console.log(manifest._body); + +```