Update config file loader docs
This commit is contained in:
parent
49631542ce
commit
57c1838f68
|
@ -52,7 +52,7 @@ You could use a class or any other object as well.
|
||||||
|
|
||||||
### From a File
|
### From a File
|
||||||
|
|
||||||
Usually you will want to load configuration from a file that is not part of the distributed application. You can load configuration from a file using `from_file(/path/to/config_file)`. However, that requires the program to know the path to the config file. So instead you can specify the location of the config file in an environment variable and tell Sanic to use that to find the config file:
|
Usually you will want to load configuration from a file that is not part of the distributed application. You can load configuration from a file using `from_pyfile(/path/to/config_file)`. However, that requires the program to know the path to the config file. So instead you can specify the location of the config file in an environment variable and tell Sanic to use that to find the config file:
|
||||||
|
|
||||||
```
|
```
|
||||||
app = Sanic('myapp')
|
app = Sanic('myapp')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user