Introduction
Scribe helps you generate API documentation for humans from your Node.js codebase. See a live example at demo.scribe.knuckles.wtf.
Features​
- Pretty single-page HTML doc, with human-friendly text, code samples, and included in-browser API tester ("Try It Out")
- Safely calls API endpoints to get sample responses
- Generates Postman collection and OpenAPI spec
- Statically define extra endpoints that aren't in your codebase
Quick links
Wondering where to start? Try one of the getting started guides (Adonis, Express, Restify), or the v2 upgrade guide.
tip
Scribe helps you generate docs automatically, but if you really want to make friendly, maintainable and testable API docs, there's some more stuff you need to know. So I made a course for you.🤗
Installation​
Requirements
Node.js 12.4.0 or higher is required.
Scribe currently supports three frameworks: AdonisJS v4, Express v4 and Restify v8.
- AdonisJS
- Express
- Restify
Install with:
npm i @knuckleswtf/scribe-adonis
Then add the service provider to the aceProviders
array in your start/app.js
:
const aceProviders = [
'@adonisjs/lucid/providers/MigrationsProvider',
'@knuckleswtf/scribe-adonis/providers/ScribeProvider', // <-- Add this
]
To generate your docs, run the Ace command scribe:generate
:
node ace scribe:generate
See the Getting Started Guide for more.
Install with:
npm i @knuckleswtf/scribe-express
To generate your docs, you'll need to locate your "app file" (the file where you create and configure your Express app). Then pass the path to Scribe:
npx scribe generate -a <your-app-file>.js
See the Getting Started Guide for more.
Install with:
npm i @knuckleswtf/scribe-restify
To generate your docs, you'll need to locate your "server file" (the file where you set up and start your Restify server). Then pass the path to Scribe:
npx scribe generate -s <your-server-file>.js
See the Getting Started Guide for more.
Next​
Alright, you're ready to start documenting! Follow one of the getting started guides (Adonis, Express, Restify) to see what you can do with Scribe.