Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r3wt/express-aglio
easily integrate aglio with express.
https://github.com/r3wt/express-aglio
aglio apib apiblueprint express express-aglio expressjs
Last synced: about 2 months ago
JSON representation
easily integrate aglio with express.
- Host: GitHub
- URL: https://github.com/r3wt/express-aglio
- Owner: r3wt
- Created: 2016-12-25T17:48:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T08:48:08.000Z (about 2 years ago)
- Last Synced: 2024-10-09T18:33:50.433Z (3 months ago)
- Topics: aglio, apib, apiblueprint, express, express-aglio, expressjs
- Language: HTML
- Homepage: https://www.npmjs.com/package/express-aglio
- Size: 300 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# express-aglio
easily use [aglio](https://github.com/danielgtaylor/aglio) with [express](https://expressjs.com/) to serve documentation for your api.
Don't know what aglio is? its an awesome commandline tool/node library tool for writing and compiling docs written in the [Api Blueprint Language (APIB)](https://apiblueprint.org/), which is really similar to markdown. It makes doc writing a breeze.
# install
---` npm install --save express-aglio `
# features
- watch fs and recompile changes with [node-watch](https://www.npmjs.com/package/node-watch)
- automatically serve docs with `express.static()` (default uri is `/docs`)
- save time by devving express app and docs at the same time from same server. easy peasy lemon squeezy.# usage
```js
var app = require('express')();require('express-aglio')(app,{
source: __dirname+ '/docs/source/index.apib',
output: __dirname+ '/docs/html/index.html'
});app.listen(3000);
```# options
```js
{
source: '',//input path/file eg /docs/source/index.apib OR /docs/source
output: '',//output path/file eg /docs/html/index.html OR /docs/html
watch: true, //watch source dir/file for changes.
expose: true, //serve docs with express
uri: '/docs', //path to serve docs from
debug: true, // disable the default logger
log: function(){ // a simple logger, you can override
this.debug && console.log.apply(console,arguments);
},
aglioOptions:{}, //options to pass specifically to aglio(themes, etc checkout aglio npm module's api for more info)
}
```
# testing
(soon-*ish*)