 CozyInstance = require '../models/instance'
+router = require '../lib/router'
 
 # Return the host meta file
 # support only JSON format

                        'auth-method': OAUTH_VERSION
                        'auth-endpoint': "#{host}/apps/remotestorage/oauth/"

                link.properties[OAUTH_VERSION] = link.properties['auth-endpoint']

                accountInfo.links.push link

            return res.send 200, accountInfo

    else
        res.send 404

            res.header 'Access-Control-Allow-Methods', 'GET'

            accountInfo = links: []
            routes = router.getRoutes()
            if routes['remotestorage']

                link =
