LearnBoost/up — Issue #14: Check Contracts Instead of instanceOf
Author: iammerrick
Created: 2012-02-28 23:27:18+00:00
State: open

Currently in the up [executable](https://github.com/LearnBoost/up/blob/master/bin/up#L93-97) on lines 93 - 97 an instanceOf method is employed to detect that the server will honor the appropriate contract. This breaks however when you have a server that honors the http.Server [contract](https://github.com/flatiron/union/blob/master/lib/core.js#L53) but is not an "instance of" http.Server. In this particular case, a union server.

This means anyone using flatiron, or another union project. Will not be able to deploy using up without some hackery. For the time being I can comment out the exception for the particular error check in the up binary and I can use it just fine.

Would you guys be open to a pull request that checked that the appropriate methods exist instead of using an instanceOf call on http.Server?