0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/website/translated_docs/pt-BR/node-api.md
verdacciobot b30a515622 docs(translate): update website Spanish and Portuguese
docs(translate): update website Spanish and Portuguese
2018-01-23 08:59:05 +01:00

1 KiB

id title
node-api Api Node

Verdaccio pode ser inicializado de forma customizada através de um script utilizando a nova API implementada a partir da verdaccio@3.0.0-alpha.10.

Utilização

Programação

 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');
        });
  });

Outros Usos

// 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();