diff --git a/docs/deploying.md b/docs/deploying.md index d759bb3c..2375b1b9 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -32,4 +32,17 @@ like so: ```python if __name__ == '__main__': app.run(host='0.0.0.0', port=1337, workers=4) +``` + +## Disable Sanic logo + +```python +from sanic.config import Config + + +class MyConfig(Config): + LOGO = '' + + +app = Sanic(__name__, config=MyConfig()) ``` \ No newline at end of file diff --git a/sanic/sanic.py b/sanic/sanic.py index 3dab3e47..02e95052 100644 --- a/sanic/sanic.py +++ b/sanic/sanic.py @@ -21,7 +21,7 @@ from os import set_inheritable class Sanic: def __init__(self, name=None, router=None, - error_handler=None, logger=None): + error_handler=None, logger=None, config=None): if logger is None: logging.basicConfig( level=logging.INFO, @@ -33,7 +33,7 @@ class Sanic: self.name = name self.router = router or Router() self.error_handler = error_handler or Handler(self) - self.config = Config() + self.config = config or Config() self.request_middleware = deque() self.response_middleware = deque() self.blueprints = {}