parent
fcf6b3933a
commit
9e0db88d91
@ -1,7 +1,18 @@
|
||||
from flask import Flask
|
||||
import mysql.connector
|
||||
|
||||
mydb = mysql.connector.connect(
|
||||
database="time_wasted",
|
||||
user="root"
|
||||
)
|
||||
mydb.autocommit = True
|
||||
cursor = mydb.cursor()
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.get('/meetings/<id>')
|
||||
def show(id):
|
||||
cursor.execute('SELECT NOW();')
|
||||
for row in cursor:
|
||||
print(row)
|
||||
return 'hi'
|
||||
|
||||
Loading…
Reference in new issue