       console.log "ERROR: cannot connect to mongo at ", mongoUrl, err
     else
       AppDatabaseWithConnection conn, app
-    return
 
-  return
 AppDatabaseWithConnection = (conn, app) ->
   mongoPost = (content) ->
     data =

    ,
      name: true
    ), res
    return

  app.get "/apps/:author/:name", (req, res) ->
    sendResult mongoFind(
      author: req.params.author
      name: req.params.name
    , {}).map(".0"), res
    return

  app.post "/apps", (req, res) ->
    sendResult mongoPost(req.body), res
    return

  app.post "/apps/:author/:name/rename/:newName", (req, res) ->
    mongoResult = Bacon.fromNodeCallback(apps, "update",

        name: req.params.newName
    )
    sendResult mongoResult, res

Bacon = require("baconjs")
randomstring = require("randomstring")
MongoClient = require("mongodb").MongoClient
