compile & serve metalanguage assets
Use as a command or as a module to handle requests such as
http://localhost:8550/js/events.js by run-time-compiling the CoffeeScript source
npm install -g metaserve
Use within a directory that has a bunch of .jade, .sass and .coffee.
metaserve with optional arguments
--port. Defaults to 0.0.0.0:8000.
npm install metaserve
Use by supplying a base directory, then hooking it in as Express/Connect middleware...
var metaserve = require'metaserve';var express = require'express';app = express;appuseapprouter;appusemetaserve'./static';appget'/dogs'return resend'woof';;applisten8550;
... or as a fallback in a standard
var http = require'http';var metaserve = require'metaserve''./static';var server = httpcreateServerif requrl === '/dogs'return resend'woof';elsereturn metaservereq res;;serverlisten8550;