lib/Hecate.js
function(path){

        // Define the array we'll return.
        var routes = [];

        // Grab the FS library.
        var fs = require('fs');

        // Read the contents from disk.
        var array = fs.readFileSync(path).toString().split("\n");

        // We need to post-process since there might have been empty lines, or comments.
        array.forEach(function(route){

            // If it's not an empty line or a comment, add it.
            if (route !== "" && route.match(/^#/) === null) {
                routes.push(route);
            }
        });

        return routes;
    }
function(path){

        // Define the array we'll return.
        var routes = [];

        // Grab the FS library.
        var fs = require('fs');

        // Read the contents from disk.
        var array = fs.readFileSync(path).toString().split("\n");

        // We need to post-process since there might have been empty lines, or comments.
        array.forEach(function(route){

            // If it's not an empty line or a comment, add it.
            if (route !== "" && route.match(/^#/) === null) {
                routes.push(route);
            }
        });

        return routes;
    }
function ( path ) { // Define the array we'll return. var routes = [ ] ; // Grab the FS library. var fs = require ( 'fs' ) ; // Read the contents from disk. var array = fs . readFileSync ( path ) . toString ( ) . split ( "\n" ) ; // We need to post-process since there might have been empty lines, or comments. array . forEach ( function ( route ) { // If it's not an empty line or a comment, add it. if ( route !== "" && route . match ( / ^# / ) === null ) { routes . push ( route ) ; } } ) ; return routes ; }
Reads a config file from disk, skipping empty lines and commented ones.
@param {string} path The path to the file to read.
Reads a config file from disk skipping empty lines and commented ones .