function createRoutes() {
	var viewDir = config.nitro.view_directory;
	var files = fs.readdirSync(viewDir);

	files.forEach(function(el) {
		var stats = fs.lstatSync(viewDir + '/' + el);
		if (stats.isFile()) {
			var cleanFileName = path.basename(el, path.extname(el));
			createRouteVariants(cleanFileName, el);
		} else if (stats.isDirectory() && isValidDirectory(el)) {
			fs.readdirSync(viewDir + '/' + el).forEach(function(file) {
				var stats = fs.lstatSync(viewDir + '/' + el + '/' + file);

				if (stats.isFile()) {
					var cleanFileName = el + '/' + path.basename(el + '/' + file, path.extname(file));
					createRouteVariants(cleanFileName, el + '/' + file);
				}
			});
		}
	});
}
/**
 * Creates route map based on view templates in view directory.
 *
 * @param config
 * @returns {Array}
 */
Creates route map based on view templates in view directory.
@param config
@returns {Array}
Creates route map based on view templates in view directory . @param config @returns { Array }
function createRoutes() {
	var viewDir = config.nitro.view_directory;
	var files = fs.readdirSync(viewDir);
	files.forEach(function(el) {
		var stats = fs.lstatSync(viewDir + '/' + el);
		if (stats.isFile()) {
			var cleanFileName = path.basename(el, path.extname(el));
			createRouteVariants(cleanFileName, el);
		} else if (stats.isDirectory() && isValidDirectory(el)) {
			fs.readdirSync(viewDir + '/' + el).forEach(function(file) {
				var stats = fs.lstatSync(viewDir + '/' + el + '/' + file);
				if (stats.isFile()) {
					var cleanFileName = el + '/' + path.basename(el + '/' + file, path.extname(file));
					createRouteVariants(cleanFileName, el + '/' + file);
				}
			});
		}
	});
}
function createRoutes ( ) { var viewDir = config . nitro . view_directory ; var files = fs . readdirSync ( viewDir ) ; files . forEach ( function ( el ) { var stats = fs . lstatSync ( viewDir + '/' + el ) ; if ( stats . isFile ( ) ) { var cleanFileName = path . basename ( el , path . extname ( el ) ) ; createRouteVariants ( cleanFileName , el ) ; } else if ( stats . isDirectory ( ) && isValidDirectory ( el ) ) { fs . readdirSync ( viewDir + '/' + el ) . forEach ( function ( file ) { var stats = fs . lstatSync ( viewDir + '/' + el + '/' + file ) ; if ( stats . isFile ( ) ) { var cleanFileName = el + '/' + path . basename ( el + '/' + file , path . extname ( file ) ) ; createRouteVariants ( cleanFileName , el + '/' + file ) ; } } ) ; } } ) ; }
Creates route map based on view templates in view directory.
Creates route map based on view templates in view directory .