1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-17 07:45:52 +01:00
verdaccio/website/translated_docs/pt-BR/node-api.md
verdacciobot 1cf6b7bff8 docs: update translations
docs: update translations
2018-02-16 19:32:53 +01:00

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