0.1.4 • Published 10 years ago

peat v0.1.4

Weekly downloads
88
License
MIT
Repository
github
Last release
10 years ago

Peat Build Status

The classes that Oban) uses for responses. require this in your route modules, and Oban in your server module.

npm install peat

API

Part

Common base class. Extend it, don't use it.

Status(code)

Tells Oban to set the HTTP status.

Header(name, value)

Tells Oban to set an HTTP header.

Extending

So you want to extend Peat? Good for you! Just grab a reference to Part, subclass it using your favourite method, and give it a useful run method. Let's say you want to add a Timeout part that calls res.setTimeout:

var Timeout = Estira.extend.call(Part, {
  initialize: function(timeout) {
		this.timeout = timeout;
	},
	run: function(res) {
		res.setTimeout(this.timeout);
	}
});

Licence

MIT.

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago