 colors = require("colors")
 _ = require("underscore")
 semver = require("semver")
-rodeoVersions = require("./versions")
+appVersions = require("./versions")
 
 
 app = express()


app.get "/", (req, res) ->
  if req.query.version
    rodeoVersions (err, versions) ->
      if err
        res.status(500)
        res.send "Could not lookup latest version"

app.post "/crash", (req, res) ->
  console.log req.body
  res.send "OK"

app.get "/versions", (req, res) ->
  appVersions (err, versions) ->
    if err
      res.status(500)
      res.send "Could not lookup latest version"
      return
    res.json versions

# catch 404 and forward to error handler
app.use (req, res, next) ->
