ZappaJS as a generic web server: CGI

Trying to write a tiny web server for munin: #!/usr/bin/env coffee cgi = require 'cgi' require('zappajs') 8080, -> @get '/munin-cgi/munin-cgi-graph*', cgi '/usr/lib/munin/cgi/munin-cgi-graph', mountPoint: '/munin-cgi/munin-cgi-graph' @use static: '/var/cache/munin/www' This uses the cgi package and a static mount point from within zappajs. Start it with: sudo -u www-data daemon -n server /path/to/server.coffee

Written on April 23, 2013