mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
8c730c0694
* refactor: max-len and printWidth to 100 * chore: ci specific pnpm version * fix: add types peer package literally get rid of types package
1 KiB
1 KiB
id | title |
---|---|
node-api | Node API |
Verdaccio can be invoked programmatically. The node API was introduced after version verdaccio@3.0.0
.
Usage
''
Programmatically
import startServer from 'verdaccio';
startServer(
configJsonFormat,
6000,
store,
'1.0.0',
'verdaccio',
(webServer, addrs, pkgName, pkgVersion) => {
webServer.listen(addr.port || addr.path, addr.host, () => {
console.log('verdaccio running');
});
}
);
Other implementations
- verdaccio-server local npm registry proxy server
// js
import * as verdaccioServer from 'verdaccio-server';
verdaccioServer.start();
verdaccioServer.stop();
verdaccioServer.list();
verdaccioServer.stopAll();
verdaccioServer.show();
verdaccioServer.cli();
// windows .net2
verdaccioServer.serviceInstall();
verdaccioServer.serviceUninstall();
verdaccioServer.serviceStart();
verdaccioServer.serviceStop();
verdaccioServer.serviceRestart();