from flask import Flask from flask import render_template from flask import Flask, request, jsonify import threading import requests, socket import pymysql # from flask_cors import CORS class Website(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.app = Flask(__name__) # CORS(self.app) #前端顯示 self.app.add_url_rule('/', 'Index', self.Index) def run(self): #self.app.run() self.app.run(host="0.0.0.0", port="5500") # 前端 def Index(self): return render_template('Index.html') def Bootstrap(self): return render_template('Index_1.html') if __name__ == '__main__': website = Website() website.run()