<commit_before>Basic guide for lua web framework
=================================
An openresty web framework, contains MVC and ORM

### HowToStart
*	Install openresty
	-	wget https://openresty.org/download/ngx_openresty-1.9.7.2.tar.gz
	-	tar zxvf ngx_openresty-1.9.7.2.tar.gz
	-	cd ngx_openresty-1.9.7.2/
	-	./configure
	-	make
	-	make install

*	Config vhost
	-	edit openresty nginx config file, add line: include sites-enabled/*;
	-	copy vhost config file to openresty config directory: sudo cp config/nginx.conf /usr/local/openresty/nginx/conf/sites-enabled/{{$project_name}}

*	Start openresty
	-	sudo /usr/local/openresty/nginx/sbin/nginx

*	Configure application and write code
	-	edit app/config/*.lua
	-	write controller to process requests. Reference app/controllers/index.lua
	-	write models to hold reusable business code

###	Architecture



### TODO

*   unittest(luaunit)

*	more doc

*   Service Locator

*	optimize orm<commit_msg>architecture<commit_after>Basic guide for lua web framework
=================================
An openresty web framework, contains MVC and ORM

### HowToStart
*	Install openresty
	-	wget https://openresty.org/download/ngx_openresty-1.9.7.2.tar.gz
	-	tar zxvf ngx_openresty-1.9.7.2.tar.gz
	-	cd ngx_openresty-1.9.7.2/
	-	./configure
	-	make
	-	make install

*	Config vhost
	-	edit openresty nginx config file, add line: include sites-enabled/*;
	-	copy vhost config file to openresty config directory: sudo cp config/nginx.conf /usr/local/openresty/nginx/conf/sites-enabled/{{$project_name}}

*	Start openresty
	-	sudo /usr/local/openresty/nginx/sbin/nginx

*	Configure application and write code
	-	edit app/config/*.lua
	-	write controller to process requests. Reference app/controllers/index.lua
	-	write models to hold reusable business code


###	Architecture

                       client
                        +  ^
                request |  |response
                        |  |
                        v  +
                    application
                         +
                         | route
                         |
                         v
                 controller:action
                   +            +
                   |            |
         relation  v            v
ar+-+ar+----------+ar     redis_cluster
                   +            +
     query_builder |            |
                   v            v
               connection   connection
                   +            +
                   |            |
                   v            v
                 mysql        redis



### TODO

*   more unittest

*	more doc

*   Service Locator

*	optimize orm
{'fraction_non_alphanumeric': 0.11106913486966377, 'fraction_numerical': 0.009066868152625614, 'mean_word_length': 1.6586345381526104, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2417815', 'n_tokens_mistral': 841, 'n_tokens_neox': 796, 'n_words': 192}