     console.log values
 ###
 
+# Return all pets
 app.get '/', (req, rep) ->
     get_data().then (values) ->
         #console.log values
         rep.json values
 
+# Return a random pet
 app.get '/random', (req, rep) ->
     get_data().then (values) ->
         random = Math.ceil Math.random()*values.length-1

splitpos = tierheim_url.lastIndexOf '/'
base_url = tierheim_url.slice 0, splitpos+1

get_details = (url)->
    new Promise (f, r) ->
        request url, (err, response, body) ->

                return
            f urls

# Get the data from cache or save data in cache if data is none
# cache lifetime: 24h
get_data = ->
    new Promise (f, r) ->
        values = cache.get('tiere')
