Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Add a app.wsgi file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Mar 1, 2016
1 parent 61947d6 commit 5ff3f73
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app.wsgi
@@ -0,0 +1,23 @@
try:
import ConfigParser as configparser
except ImportError:
import configparser
import logging.config
import os

from kinto import main

here = os.path.dirname(__file__)

ini_path = os.environ.get('KINTO_INI')
if ini_path is None:
ini_path = os.path.join(here, 'config', 'kinto.ini')

# Set up logging
logging.config.fileConfig(ini_path)

# Parse config and create WSGI app
config = configparser.ConfigParser()
config.read(ini_path)

application = main(config.items('DEFAULT'), **dict(config.items('app:main')))

1 comment on commit 5ff3f73

@phrawzty
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.