 github    = require "octonode"
 
 GitHubApi = require "github"
+
+
+app = module.exports = express.createServer()
 
 
 nconf

#         gitty.push __dirname + "/repos/dsad", "origin", "master", (err, data) ->
#           console.log "xx5", err, data

app = module.exports = express.createServer()




  gh = new GitHubApi version: "3.0.0"
  gh.repos.getFromOrg {org: "communities"}, (err, repos) ->
    repos = _.filter repos, (repo) -> repo.name != 'gitcommunities.com'
    communitiesFetchFuncs = []
    _.each repos, (repo) ->
      communitiesFetchFuncs.push async.apply getCommunity, repo.name
    async.parallel communitiesFetchFuncs, (err, repos) ->
      res.json repos

app.get "/api/communities/:community", (req, res) ->
  community = req.params.community
