text: 'use strict';
  
  var path = process.cwd();
  var ClickHandler = require(path + '/app/controllers/clickHandler.server.js');
  var TimestampHandler = require(path + '/app/controllers/timestampHandler.server.js');
  
  module.exports = function (app, passport) {
  
  	function isLoggedIn (req, res, next) {
  		if (req.isAuthenticated()) {
  			return next();
  		} else {
  			res.redirect('/login');
  		}
  	}
  
  	var clickHandler = new ClickHandler();
  	var timestampHandler = new TimestampHandler();
  
  	app.route('/')
  		.get(function (req, res) {
  			res.sendFile(path + '/public/index.html');
  		});
  
  	app.route('/auth/github')
  		.get(passport.authenticate('github'));
  
  	app.route('/auth/github/callback')
  		.get(passport.authenticate('github', {
  			successRedirect: '/',
  			failureRedirect: '/login'
  		}));
  
  	app.route('/api/:data')
  		.get(timestampHandler.convertTimestamp);
  };
  