from src import application import os application.secret_key = os.urandom(24) port = int(os.environ.get('PORT', 5000)) application.run(host='0.0.0.0', port=port)
from src import application if __name__ == "__main__": application.run()
from src import application import logging if __name__ != '__main__': gunicorn_logger = logging.getLogger('gunicorn.error') application.logger.handlers = gunicorn_logger.handlers application.logger.setLevel(gunicorn_logger.level) if __name__ == '__main__': application.run(threaded=True)
from src import application, api from src.users.views import users_ns from src.auth.views import auth_ns from src.task_rooms.views import taskrooms_ns from src.task_rooms.tasks.views import tasks_ns from src.dev.views import dev_ns api.add_namespace(users_ns, '/api/v1/users') api.add_namespace(auth_ns, "/api/v1/auth") api.add_namespace(taskrooms_ns, "/api/v1/task_rooms") api.add_namespace(tasks_ns, "/api/v1/tasks") api.add_namespace(dev_ns, "/api/v1/dev") if __name__ == '__main__': application.run(host='0.0.0.0', port=31865)
def main(): import src.application as app app.run()
from src import application import argparse import os import configparser import shutil from src.core.data import DataConfig from src.data.sqlite import UserDataStrategy, ReplyDataStrategy if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--debug", action="store_true") args = parser.parse_args() #DataConfig.UserDataStrategy = UserDataStrategy #DataConfig.ReplyDataStrategy = ReplyDataStrategy DataConfig.initializeDataStrategy("sqllite") if args.debug: application.run(host='0.0.0.0', port=5000, debug=True) else: application.run(host='0.0.0.0', port=5000, debug=False)
#!/usr/bin/env python3 # debug from src import application if __name__ == '__main__': application.run(debug=True)
def main(path): # 작업 디렉토리의 path를 추가 import sys sys.path.append(path) import src.application as app app.run()