Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 459 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 459 Bytes

Baiji swagger plugin

Installation

npm install baiji-swagger --save

Usage

const baiji = require('baiji');

const app = baiji('myApp');

app.plugin(
  require('baiji-swagger'),
  {
    basicAuth: { name: 'doc', pass: 'your_doc_password' },
    swagger: {
      info: { title: 'My API DOCUMENTATION' }
    }
  }
);

app.listen(3000);

Then browse your api documentation at http://localhost:3000/__swagger__/

Enjoy!