easily use aglio with express 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), which is really similar to markdown. It makes doc writing a breeze.
npm install --save express-aglio
- watch fs and recompile changes with 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.
varapp=require('express')();require('express-aglio')(app,{source: __dirname+'/docs/source/index.apib',output: __dirname+'/docs/html/index.html'});app.listen(3000);{source: '',//input path/file eg /docs/source/index.apib OR /docs/sourceoutput: '',//output path/file eg /docs/html/index.html OR /docs/htmlwatch: true,//watch source dir/file for changes.expose: true,//serve docs with expressuri: '/docs',//path to serve docs fromdebug: true,// disable the default loggerlog: function(){// a simple logger, you can overridethis.debug&&console.log.apply(console,arguments);},aglioOptions:{},//options to pass specifically to aglio(themes, etc checkout aglio npm module's api for more info)}(soon-ish)