<commit_before>'use strict';

/*
HQ: Instead of the traditional MVC design patterns, 
we prefer keeping everything related to one resource,
together in one easy place. 

You could stub these out into separate files, but 
we find that it's always good to start with 
something simple before needing anything more complex.

We return each Model, Middlewares and Routes, allowing
our main express file to decide the order of waterfalling
any resources we'd want.
*/


/*==============
Dependencies
==============*/


/*==============
Model
==============*/

/*
Export model and also set it to var, for easy use inside
this resource's middlewares and routes.
*/

var model = module.exports.model = function() {
	
	return {

	};

};


/*==============
Middlewares
==============*/

module.exports.middlewares = function(app, express, models) {

	app.use(function(req, res, next) {
		console.log(`applying items middleware`);
		next();
	});

	return app;

};


/*==============
Routes
==============*/

module.exports.routes = function(app, express, models) {

	app.get('/items', function(req, res) {
		var data = [];
		var status = data.length > 0 ? 200 : 404;
		res.status(status).send({ status, data });
	});

	return app;

};<commit_msg>removed middleware console logging<commit_after>'use strict';

/*
HQ: Instead of the traditional MVC design patterns, 
we prefer keeping everything related to one resource,
together in one easy place. 

You could stub these out into separate files, but 
we find that it's always good to start with 
something simple before needing anything more complex.

We return each Model, Middlewares and Routes, allowing
our main express file to decide the order of waterfalling
any resources we'd want.
*/


/*==============
Dependencies
==============*/


/*==============
Model
==============*/

/*
Export model and also set it to var, for easy use inside
this resource's middlewares and routes.
*/

var model = module.exports.model = function() {
	
	return {

	};

};


/*==============
Middlewares
==============*/

module.exports.middlewares = function(app, express, models) {

	app.use(function(req, res, next) {
		
		next();
	});

	return app;

};


/*==============
Routes
==============*/

module.exports.routes = function(app, express, models) {

	app.get('/items', function(req, res) {
		var data = [];
		var status = data.length > 0 ? 200 : 404;
		res.status(status).send({ status, data });
	});

	return app;

};
{'fraction_non_alphanumeric': 0.19510204081632654, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 4.116910229645094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5754765', 'n_tokens_mistral': 765, 'n_tokens_neox': 686, 'n_words': 258}