Skip to content

Baiji swagger plugin: explore api documentation with one line of code

License

Notifications You must be signed in to change notification settings

baijijs/swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Baiji swagger plugin: explore api documentation with one line of code

Resources

License

Stars

Watchers

Forks

Packages

No packages published