<commit_before>	var MyTask = require('./models/task');

module.exports = function(app, passport) {

	// api ---------------------------------------------------------------------
	// get all todos
	
	
	// application -------------------------------------------------------------
	app.get('/login', function(req, res) {
		res.sendfile('./public/html/login.html'); // load the single view file (angular will handle the page changes on the front-end)
	});
	
	app.get('/logout', function(req, res) {
		req.logout();
		res.redirect('/login');
	});
	
	app.get('/home', isLoggedIn, function(req, res){
		res.sendfile('./public/html/home.html');
	});
	
	app.post('/login', passport.authenticate('local-login', {
		successRedirect : '/home', // redirect to the secure profile section
		failureRedirect : '/login', // redirect back to the signup page if there is an error
		failureFlash : true // allow flash messages
	}));
	//GET function for signup page
	app.get('/signup', function(req, res){
		res.sendfile('./public/html/signup.html');
	});<commit_msg>Update route.js<commit_after>	var MyTask = require('./models/task');

module.exports = function(app, passport) {

	// api ---------------------------------------------------------------------
	// get all todos
	
	
	// application -------------------------------------------------------------
	app.get('/login', function(req, res) {
		res.sendfile('./public/html/login.html'); // load the single view file (angular will handle the page changes on the front-end)
	});
	
	app.get('/logout', function(req, res) {
		req.logout();
		res.redirect('/login');
	});
	
	app.get('/home', isLoggedIn, function(req, res){
		es.header('Cache-Control', 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0');
		res.sendfile('./public/html/home.html');
	});
	
	app.post('/login', passport.authenticate('local-login', {
		successRedirect : '/home', // redirect to the secure profile section
		failureRedirect : '/login', // redirect back to the signup page if there is an error
		failureFlash : true // allow flash messages
	}));
	//GET function for signup page
	app.get('/signup', function(req, res){
		res.sendfile('./public/html/signup.html');
	});
{'fraction_non_alphanumeric': 0.2757685352622061, 'fraction_numerical': 0.00135623869801085, 'mean_word_length': 2.2785185185185184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3569338', 'n_tokens_mistral': 660, 'n_tokens_neox': 614, 'n_words': 163}