-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
24 lines (18 loc) · 659 Bytes
/
app.py
File metadata and controls
24 lines (18 loc) · 659 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
from flask import Flask, jsonify
from flask_mysqldb import MySQL
from my_blueprint import my_blueprint # Importa el Blueprint desde my_blueprint.py
from flask_cors import CORS
import base64
app = Flask(__name__)
CORS(app)
# Configura la base de datos utilizando las credenciales
app.config['MYSQL_HOST'] = '127.0.0.1'
app.config['MYSQL_PORT'] = 3306
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = 'Weimar123456789'
app.config['MYSQL_DB'] = 'asistente'
app.register_blueprint(my_blueprint) # Registra el Blueprint en la aplicación
# Configura la extensión MySQL
mysql = MySQL(app)
if __name__ == '__main__':
app.run(debug=True)