mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
d1bed601b7
docs: update translations
20 lines
No EOL
483 B
Markdown
20 lines
No EOL
483 B
Markdown
---
|
|
id: node-api
|
|
title: Node API
|
|
---
|
|
Verdaccio can be invoqued programmatically. The node API was introduced after version `verdaccio@3.0.0-alpha.10`.
|
|
|
|
## Usage
|
|
|
|
#### Programmatically
|
|
|
|
```js
|
|
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');
|
|
});
|
|
});
|
|
``` |