0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/.changeset/two-dolls-check.md
Juan Picado 8f43bf17df feat: improve node-api (#2165)
* refactor: improve node-api

* chore: add test for run server
2021-04-09 17:54:43 +02:00

662 B

@verdaccio/cli @verdaccio/config @verdaccio/types @verdaccio/logger @verdaccio/node-api verdaccio-google-cloud verdaccio
major major major major major major major

feat: node api new structure based on promise

import { runServer } from '@verdaccio/node-api';
// or
import { runServer } from 'verdaccio';

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

Breaking Change

If you are using the node-api, the new structure is Promise based and less arguments.