Skip to main content
Version: Next

@verdaccio/node-api

Functions

initServer

initServer(config, port, version, pkgName): Promise<void>

Start the server on the port defined

Parameters

NameType
configConfigYaml
portstring | void
versionstring
pkgNamestring

Returns

Promise<void>

Defined in

server.ts:117


runServer

runServer(config?): Promise<any>

Exposes a server factory to be instantiated programmatically.

const app = await runServer(); // default configuration
const app = await runServer('./config/config.yaml');
const app = await runServer({ configuration });
app.listen(4000, (event) => {
// do something
});

Parameters

NameType
config?string | ConfigYaml

Returns

Promise<any>

Defined in

server.ts:200