How to use verdaccio - 5 common examples

To help you get started, we’ve selected a few verdaccio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / beachball / packages / beachball / src / fixtures / verdaccio.js View on Github external
}
    },
    store: {
      memory: {
        limit: 1000
      }
    }
  };
  
  const addr = {
    port: port,
    path: '/',
    host: 'localhost'
  };
  
  startServer(config, port, store, '1.0.0', 'verdaccio', (webServer, addrs, pkgName, pkgVersion) => {
    webServer.listen(addr.port || addr.path, addr.host, () => {
      // This is logged to tell whoever spawns us that we're ready.
      console.log('verdaccio running');
      console.dir({ addrs });
    });
  });
}
github verdaccio / ui / tools / verdaccio.js View on Github external
});

const serverHandler = function(webServer, addr, pkgName, pkgVersion) {
  webServer.listen(addr.port || addr.path, addr.host, () => {
    console.log(`${pkgName}:${pkgVersion} running ${addr.proto}://${addr.host}:${addr.port}`);
  });

  process.on('SIGTERM', () => {
    webServer.close(() => {
      console.log('verdaccio server has been shutdown');
    });
  });
};

// https://verdaccio.org/docs/en/node-api
startServer(configJsonFormat, 8080, '', '1.0.0', 'verdaccio', serverHandler);
github aws / aws-cdk / tools / y-npm / lib / start-verdaccio.ts View on Github external
packages,
      max_body_size: '100mb',
      logs: [{
          type: 'file',
          path: path.join(storage, 'verdaccio.log'),
          format: 'pretty-timestamped',
          level: 'info'
        }],
      web: { enabled: false },
      publish: { allow_offline: true }
    };
    debug(`Verdaccio config (publishing mode: ${forPublishing}): ${JSON.stringify(config, null, 2)}`);

    try {
      // tslint:disable-next-line:no-var-requires
      require('verdaccio').default(config, 6000, config.storage, '1.0.0', 'verdaccio', verdaccioHandler);
    } catch (e) {
      error(`Failed to start verdaccio: ${e.stack}`);
      reject(e);
    }
  });
}
github aws / aws-cdk / packages / aws-cdk-npm / lib / index.ts View on Github external
access: '$all',
                    proxy: 'npmjs'
                }
            },
            max_body_size: '100mb',
            logs: [{
                    type: 'file',
                    path: path.join(storage, 'verdaccio.log'),
                    format: 'pretty-timestamped',
                    level: 'info'
                }]
        };

        try {
            // tslint:disable-next-line:no-var-requires
            require('verdaccio').default(config, 6000, config.storage, '1.0.0', 'verdaccio', verdaccioHandler);
        } catch (e) {
            reject(e);
        }
    });
}
github unboundedsystems / adapt / testutils / src / local-registry.ts View on Github external
const server = await new Promise((resolve, reject) => {
        try {
            startVerdaccio(config, config.listen, configPath, "1.0.0", "verdaccio",
                (webServer: http.Server, addr: any, _pkgName: any, _pkgVersion: any) => {
                    webServer.on("error", reject);
                    webServer.listen(addr.port || addr.path, addr.host, () => {
                        resolve(webServer);
                    });
                });
        } catch (err) {
            reject(err);
        }
    });

verdaccio

A lightweight private npm proxy registry

MIT
Latest version published 1 month ago

Package Health Score

92 / 100
Full package analysis

Popular verdaccio functions