forked from Sevvalm/JobFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (24 loc) · 779 Bytes
/
main.py
File metadata and controls
27 lines (24 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
Main entry point for the JobFlow application.
Configures and runs the Flask server.
"""
import os
from flask import Flask
from dotenv import load_dotenv
from controller.job_controller import job_bp
load_dotenv()
def create_app():
"""
Factory function to create and configure the Flask application.
Registers blueprints and sets template folders.
Returns:
Flask: The configured Flask application instance.
"""
app_instance = Flask(__name__, template_folder='ui/templates')
app_instance.register_blueprint(job_bp)
return app_instance
if __name__ == '__main__':
app = create_app()
port = int(os.getenv("PORT", "5000"))
print(f"JobFlow Started... http://127.0.0.1:{port}")
app.run(host='0.0.0.0', port=port, debug=True)