   )
 else
   app = express.createServer()
+  
 module.exports = app
 
 # Configuration
 app.configure ->
-  app.set "views", __dirname + "/views"
+  app.set "views", path.join __dirname, "..", "views"
   app.set "view engine", "utml"
   app.use express.bodyParser()
   app.use express.methodOverride()
   app.use express.logger()
   app.use app.router
-  app.use express.static(__dirname + "/public")
+  app.use express.static path.join __dirname, "..", "public"
 
 app.configure "development", ->
   app.use express.errorHandler(

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
fs = require("fs")
express = require("express")
routes = require("./routes")
localURL = require("./url").localURL
config = require("./config")
os = require("os")
Databank = require("databank").Databank
globals = require("./globals")
Hub = require("./hub").Hub
Feed = require("./feed").Feed
server = config.server or os.hostname()
address = config.address or server
useHTTPS = (if (config.key) then true else false)
app = undefined
bounce = undefined
localURL.server = server
localURL.protocol = (if (useHTTPS) then "https" else "http")
if useHTTPS
  app = express.createServer(
    key: fs.readFileSync(config.key)

      bounce.listen 80, address
    else
      app.listen 80, address
