Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

swagger-editor-serve

trioletas15MIT2.0.1

Serve Swagger Editor

swagger, editor, connect

readme

swagger-editor-serve

Serve Swagger Editor

Installing

$ npm i swagger-editor-serve -S

Using

Default Configuration

// starts the server and returns a promise that yields editor url object
const serve = require('./index');
serve()
  .then(c => console.log(c));

Configuration Override

const serve = require('./index');
serve({
  editorPath: '../node_modules/swagger-editor-dist',
  serverUrl: {
    port: 9000
  }
}).then(c => console.log(c));

Node Compatibility

Requires Node >= 8

License

MIT