module.exports = function(app) {
  var knex = app.get('knex');
  app.get('/', function (req, res) {
    knex.select('*').from('ghprojects').then(function(projects) {
      return res.render('index.hjs', { projects: projects });
    });
  });
  app.post('/', function (req, res) {
    knex.select('*')
      .from('ghprojects')
      .where({ gh_language: req.body.language })
      .then(function (projects) {
        return res.render('index.hjs', {
          filter_lang: req.body.language,
          projects: projects
        });
      });
  });
};

@@ -1,8 +1,45 @@
+var backend = require('./backend');%0A%0A
 module.e
@@ -580,11 +580,274 @@
 ;%0A  %7D);%0A
+  app.get('/refresh-content', function (req, res) %7B%0A    console.log(%22Starting job.%22);%0A    backend.httpGet(%0A        backend.hn_api_host,%0A        '/v0/topstories.json',%0A        backend.processHNPosts);%0A        backend.clearOldPosts();%0A    res.redirect('/');%0A  %7D);%0A%0A
 %7D;%0A

Add magic refresh-content endpoint