A little microframework for Node.JS, based on the design of Why’s Camping and Markaby rubygems
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README
campy.js
mootools-1.2.3-core-server.js
mootools-1.2.3.1-more.js
sha256.js
tago.js

README

Campy is a little itsy bitsy web framework for the Node.JS server system, providing url routing, helpers, a html5 builder similar in design to Markaby and view module, cookie support, and eventually, cookie based signed session handling.

This little critter has been inspired by the mythical Why The Lucky Stiff’s “Camping” framework for ruby, as well as Markaby. It does not aim to be a direct clone however, and diverges in many ways. The aim is that it will be familiar to Camping and Markaby users, while making the best API decisions possible given the javascript environment.

Of particular note, one line in the mootools more included with this, is modified, to make it compatible with DOM-less environments (such as node). The issue was with the base URI.

Of exceptional note, Campy makes use of my load() function for dependancy loading, as defined here:

process.window = process;

// loads files simply
process.prependLoadString = '';
var alreadyLoaded = [];
process.load = function(file) {
  var file = prependLoadString + file;
  if (alreadyLoaded.indexOf(file) != -1) return;
  alreadyLoaded.push(file);

  var prevLoadString = prependLoadString;
  process.prependLoadString = file.slice(0, file.lastIndexOf('/') + 1);
  process.eval('with (process) {\n' + node.fs.cat(file).wait() + "\n}");
  process.prependLoadString = prevLoadString;
}

load('Campy/campy.js');