                     .trim()
             f details
 
+# Get all urls for pets
 get_detailUrls = (url) ->
     new Promise (f, r) ->
         request url, (err, response, body) ->

    console.log values
###

app.get '/', (req, rep) ->
    get_data().then (values) ->
        #console.log values
        rep.json values

app.get '/random', (req, rep) ->
    get_data().then (values) ->
        random = Math.ceil Math.random()*values.length-1

                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')
