From 09b40bc5878a14c16e61d24c0742a761db22523a Mon Sep 17 00:00:00 2001 From: paulr Date: Sun, 30 Dec 2012 22:33:48 +1100 Subject: [PATCH] updated the readme with some details about how the project works --- Readme.md | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/Readme.md b/Readme.md index 15afed4..da7ad71 100644 --- a/Readme.md +++ b/Readme.md @@ -5,6 +5,7 @@ Stands for "Node JS, Primary URL Servicer". It is a simple web framework that pr and overhead for createing web applications based on the basic URL. There are manu default parts that are used when servicing a web based applications. + How It Works ============ @@ -36,4 +37,19 @@ A request to http://localhost:8888/mypage will create html that looks like so: and it does this by printing out the layout then reaplcing the bits with the functions in the purl defined with the same name of the tag. For EG means call the exported function "body" from mypage.js. Defaults -also do exist, and so you dont necessarily have to define your own everytime. \ No newline at end of file +also do exist, and so you dont necessarily have to define your own everytime. + + +Static Files +============ + +Static resources are similarly very simple (for eg jpg's, png's, html, etc etc). +Any call to njspurls for a url that ends with a file with an extension are assumed +to be static... I.e. if the url is http://host/file.ext will make njspurls send a +file called "file.ext" from the res directory. URL Paths are not relavent here but +any url that ends with a x.y filename at the end WILL be serviced as a static file +from the res directory. + +It should be noted that the path to the file in the URL is not important to +njspurls, for eg http://host/file.ext is exactly the same as +http://host/long/path/file.ext (i.e. the same file will be returned). \ No newline at end of file -- 1.7.0.4