<commit_before># exiler
An easy&amp;&amp;useful restful-server with node.js

`$ npm install exiler`

### Example:

    var exiler = require("exiler");
    var port = 1080;

    var options = {
	    route: {
	        // url goes to "http://localhost:1080" or "http://localhost:1080/" or "http://localhost:1080/index"
		    index: {
			    data: function () {
				    return {aaa: 1};
			    }
		    },
		    // url goes to "http://localhost:1080/page"
		    page: {
			    data: {
				    bbb: 2
			    },
			    template: "page.ejs"
		    }
	    }
    };

    exiler.server(options, port);
    
`port` should be optional, default to 9527

You should create a new folder named `public` in your app root folder and put all of static files (js, css, etc) into it, and use `/public/xxx/xxx.css` url to visit by your static files structure.

You should create a new folder named `template` in your app root folder and put `.ejs` template into it.

If your route goes to:

    page: {
	    data: {
		    bbb: 2
	    },
	    template: "page.ejs"
	}

This route should render html page combined with ejs template and data automatically.

### Todo:

Continue to refine code structure.
<commit_msg>update read<commit_after># exiler
An easy&amp;&amp;useful restful-server with node.js

`$ npm install exiler`

### Example:

    var exiler = require("exiler");
    var port = 1080;

    var options = {
	    route: {
	        // url goes to "http://localhost:1080" or "http://localhost:1080/"
	        // or "http://localhost:1080/index"
		    index: {
			    data: function () {
				    return {aaa: 1};
			    }
		    },
		    // url goes to "http://localhost:1080/page"
		    page: {
			    data: {
				    bbb: 2
			    },
			    template: "page.ejs"
		    }
	    }
    };

    exiler.server(options, port);
    
`port` should be optional, default to 9527

You should create a new folder named `public` in your app root folder and put all of static files (js, css, etc) into it, and use `http://localhost:1080/public/xxx/xxx.css` url to visit by your static files structure.

You should create a new folder named `template` in your app root folder and put `.ejs` template into it.

If your route goes to:

    page: {
	    data: {
		    bbb: 2
	    },
	    template: "page.ejs"
	}

This route should render html page combined with ejs template and data automatically.

### Todo:

Continue to refine code structure.

Implement data dynamic fetching.

{'fraction_non_alphanumeric': 0.1134780827529701, 'fraction_numerical': 0.02376075378943056, 'mean_word_length': 2.345205479452055, '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': '4378283', 'n_tokens_mistral': 886, 'n_tokens_neox': 740, 'n_words': 279}