mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
Uncommented mariadb conn
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
from flask import Flask, request, render_template, jsonify
|
from flask import Flask, request, render_template, jsonify
|
||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
# import mariadb
|
import mariadb
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@@ -18,13 +18,12 @@ mqtt_client.loop_start()
|
|||||||
mqtt_client.subscribe("kobuki/data")
|
mqtt_client.subscribe("kobuki/data")
|
||||||
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use
|
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use
|
||||||
|
|
||||||
# conn = mariadb.connect(
|
conn = mariadb.connect(
|
||||||
# host='127.0.0.1',
|
host='127.0.0.1',
|
||||||
# port= 3306,
|
user='admin',
|
||||||
# user='admin',
|
password='kobuki',
|
||||||
# password='kobuki',
|
database='kobuki')
|
||||||
# database='kobuki')
|
cur = conn.cursor()
|
||||||
# cur = conn.cursor()
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
|
Reference in New Issue
Block a user