-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
40 lines (32 loc) · 904 Bytes
/
main.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
from flask import Flask, jsonify, session, render_template
from flask_cors import CORS
from datetime import timedelta
import os, json
from api.bst import bst
from api.minHeap import minH
from api.maxHeap import maxH
from api.rbTree import rbt
app = Flask(__name__, template_folder="DS_html", static_folder="frontend")
CORS(app)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/bst')
def BST():
return render_template('BST.html')
@app.route('/minHeap')
def MinHeap():
return render_template('MinHeap.html')
@app.route('/maxHeap')
def MaxHeap():
return render_template('MaxHeap.html')
@app.route('/rbTree')
def RBTree():
return render_template('RBTree.html')
@app.route('/tutor')
def Tutor():
return render_template('Tutor.html')
app.register_blueprint(bst)
app.register_blueprint(minH)
app.register_blueprint(maxH)
app.register_blueprint(rbt)