Phyks (Lucas Verney)
a57d9ce8e3
* Init Webpack / Babel / etc setup. * Build the app using Vue, Vue-router, Vuex. * i18n Some backends changes were made to match the webapp development: * Return the flat status as a single string ("new" rather than "FlatStatus.new") * Completely switch to calling Weboob API directly for fetching * Use Canister for Bottle logging * Handle merging of details dict better * Add a WSGI script * Keep track of duplicates * Webserver had to be restarted to fetch external changes to the db * Handle leboncoin module better Also add contributions guidelines. Closes issue #3 Closes issue #14.
34 lines
721 B
Python
34 lines
721 B
Python
# coding: utf-8
|
|
"""
|
|
Expose a WSGI-compatible application to serve with a webserver.
|
|
"""
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
import logging
|
|
import os
|
|
import sys
|
|
|
|
import flatisfy.config
|
|
from flatisfy.web import app as web_app
|
|
|
|
|
|
class Args():
|
|
config = os.path.join(
|
|
os.path.dirname(os.path.realpath(__file__)),
|
|
"config/config.json"
|
|
)
|
|
|
|
|
|
LOGGER = logging.getLogger("flatisfy")
|
|
|
|
|
|
CONFIG = flatisfy.config.load_config(Args())
|
|
if CONFIG is None:
|
|
LOGGER.error("Invalid configuration. Exiting. "
|
|
"Run init-config before if this is the first time "
|
|
"you run Flatisfy.")
|
|
sys.exit(1)
|
|
|
|
|
|
application = app = web_app.get_app(CONFIG)
|