~lastrosade/getcraft

969672435fa9f358482e88226c3d212c330078eb — Jeremy Lee Shields 4 years ago 53e16e8 master
Updated README.md
1 files changed, 15 insertions(+), 3 deletions(-)

M README.md
M README.md => README.md +15 -3
@@ 17,6 17,9 @@ Routes are in the routes.json file
- text, sends res as text
- file, sends file content
- directory, sends files contents in directory as json
  
    for example:

    ```json
    [
        {


@@ 29,12 32,14 @@ Routes are in the routes.json file
        }
    ]
    ```

- route
    - get, returns the content of the routing array as json
    - refresh, refresh the routes array
  - get, returns the content of the routing array as json
  - refresh, refresh the routes array

#### optional

- mime = sets the "Content-Type" header
- status = force http status code

## Example


@@ 73,6 78,13 @@ Routes are in the routes.json file
            "type": "route refresh"
        },

        // Optionally specify the mime type of the file
        {
            "req": "/index_mime",
            "type": "file",
            "mime": "text/lua",
            "res": "src/index.lua"
        },
        // Optionally give http status code
        {
            "req": "/500",


@@ 82,4 94,4 @@ Routes are in the routes.json file
        }
    ]
}
```
\ No newline at end of file
```