# Copyright (C) 2011 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. # Simple WSGI module intended to be used by uWSGI, e.g.: # uwsgi -w acoustid.wsgi --pythonpath ~/acoustid/ --env ACOUSTID_CONFIG=~/acoustid/acoustid.conf --http :9090 # uwsgi -w acoustid.wsgi --pythonpath ~/acoustid/ --env ACOUSTID_CONFIG=~/acoustid/acoustid.conf -M -L --socket 127.0.0.1:1717 import os from acoustid.server import make_application server, application = make_application(os.environ['ACOUSTID_CONFIG'])
#!/usr/bin/env python import os import logging from werkzeug.serving import run_simple from acoustid.server import make_application logging.basicConfig(level=logging.DEBUG) config_path = os.path.dirname(os.path.abspath(__file__)) + '/../acoustid.conf' server, application = make_application(config_path) # server static files static_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'static')) static_files = { '/favicon.ico': os.path.join(static_path, 'favicon.ico'), '/static': static_path, } host = '0.0.0.0' port = 5000 run_simple(host, port, application, use_reloader=True, static_files=static_files, processes=5)
# Copyright (C) 2011 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. # Simple WSGI module intended to be used by uWSGI, e.g.: # uwsgi -w acoustid.wsgi --pythonpath ~/acoustid/ --env ACOUSTID_CONFIG=~/acoustid/acoustid.conf --http :9090 # uwsgi -w acoustid.wsgi --pythonpath ~/acoustid/ --env ACOUSTID_CONFIG=~/acoustid/acoustid.conf -M -L --socket 127.0.0.1:1717 import os, sys base_dir = os.path.join(os.path.dirname(__file__), '..') activate_this = os.path.join(base_dir, 'e', 'bin', 'activate_this.py') if os.path.exists(activate_this): execfile(activate_this, dict(__file__=activate_this)) sys.path.insert(0, base_dir) from acoustid.server import make_application application = make_application(os.environ['ACOUSTID_CONFIG'])
#!/usr/bin/env python import os import logging from werkzeug.serving import run_simple from acoustid.server import make_application logging.basicConfig(level=logging.DEBUG) config_path = os.path.dirname(os.path.abspath(__file__)) + '/../acoustid.conf' application = make_application(config_path) # server static files static_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'static')) static_files = { '/favicon.ico': os.path.join(static_path, 'favicon.ico'), '/static': static_path, } host = 'localhost' port = 8080 run_simple(host, port, application, use_reloader=True, static_files=static_files)
# flake8: noqa import gevent.monkey gevent.monkey.patch_all() import psycogreen.gevent psycogreen.gevent.patch_psycopg() from acoustid.server import make_application application = make_application()