diff --git a/.gitignore b/.gitignore index a49df29..99ba3e2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ logs/* static/* .DS_Store -.coverage \ No newline at end of file +.coverage + +docs/ +dist/ \ No newline at end of file diff --git a/config.docs.yaml b/config.docs.yaml new file mode 100644 index 0000000..9694eb1 --- /dev/null +++ b/config.docs.yaml @@ -0,0 +1,39 @@ +# PyServe configuration for serving documentation +# Usage: pyserve -c config.docs.yaml + +http: + static_dir: ./docs + templates_dir: ./templates + +server: + host: 0.0.0.0 + port: 8000 + backlog: 5 + default_root: false + +ssl: + enabled: false + +logging: + level: INFO + console_output: true + +extensions: + - type: routing + config: + regex_locations: + "=/": + root: "./docs" + index_file: "index.html" + + "~*\\.(css)$": + root: "./docs" + cache_control: "public, max-age=3600" + + "~*\\.html$": + root: "./docs" + cache_control: "no-cache" + + "__default__": + root: "./docs" + index_file: "index.html" diff --git a/pyserve/__init__.py b/pyserve/__init__.py index 2b56124..e9a87e2 100644 --- a/pyserve/__init__.py +++ b/pyserve/__init__.py @@ -2,7 +2,7 @@ PyServe - HTTP web server written on Python """ -__version__ = "0.6.0" +__version__ = "0.7.0" __author__ = "Ilya Glazunov" from .server import PyServeServer