forked from cuspaceflight/ruaumoko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manager: add configuration from environment
For the development web server the environment variable ``RUAUMOKO_SETTINGS`` may now optionally be set. If it is set, it points to a configuration file which can be used to configure the webapp settings including, but not limited to, the path to the ruaumoko dataset.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
"""Command-line utility to run/manage webapp.""" | ||
import os | ||
|
||
from flask.ext.script import Manager | ||
from .api import app | ||
|
||
manager = Manager(app) | ||
|
||
def main(): | ||
if 'RUAUMOKO_SETTINGS' in os.environ: | ||
app.config.from_envvar('RUAUMOKO_SETTINGS') | ||
manager.run() |