Updated README
This commit is contained in:
parent
fcbcbd53bd
commit
301a419c02
24
README.md
24
README.md
@ -51,6 +51,11 @@ svr.listen_after_bind();
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
svr.set_base_dir("./www"); // This is same as `svr.set_base_dir("./www", "/")`;
|
svr.set_base_dir("./www"); // This is same as `svr.set_base_dir("./www", "/")`;
|
||||||
|
|
||||||
|
// User defined file extension and MIME type mappings
|
||||||
|
svr.set_file_extension_and_mimetype_mapping("cc", "text/x-c");
|
||||||
|
svr.set_file_extension_and_mimetype_mapping("cpp", "text/x-c");
|
||||||
|
svr.set_file_extension_and_mimetype_mapping("hh", "text/x-h");
|
||||||
```
|
```
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
@ -62,6 +67,25 @@ svr.set_base_dir("./www1", "/public"); // 1st order
|
|||||||
svr.set_base_dir("./www2", "/public"); // 2nd order
|
svr.set_base_dir("./www2", "/public"); // 2nd order
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The followings are built-in mappings:
|
||||||
|
|
||||||
|
| Extension | MIME Type |
|
||||||
|
| :--------- | :--------------------- |
|
||||||
|
| .txt | text/plain |
|
||||||
|
| .html .htm | text/html |
|
||||||
|
| .css | text/css |
|
||||||
|
| .jpeg .jpg | image/jpg |
|
||||||
|
| .png | image/png |
|
||||||
|
| .gif | image/gif |
|
||||||
|
| .svg | image/svg+xml |
|
||||||
|
| .ico | image/x-icon |
|
||||||
|
| .json | application/json |
|
||||||
|
| .pdf | application/pdf |
|
||||||
|
| .js | application/javascript |
|
||||||
|
| .wasm | application/wasm |
|
||||||
|
| .xml | application/xml |
|
||||||
|
| .xhtml | application/xhtml+xml |
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user