-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
27 lines (19 loc) · 709 Bytes
/
Copy pathapp.py
File metadata and controls
27 lines (19 loc) · 709 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
25
26
27
from flask import Flask, send_from_directory
import os
app = Flask(__name__)
react_folder = 'flask-tutorial'
directory= os.getcwd()+ f'/{react_folder}/build/static'
@app.route('/')
def index():
''' User will call with with thier id to store the symbol as registered'''
path= os.getcwd()+ f'/{react_folder}/build'
print(path)
return send_from_directory(directory=path,path='index.html')
#
@app.route('/static/<folder>/<file>')
def css(folder,file):
''' User will call with with thier id to store the symbol as registered'''
path = folder+'/'+file
return send_from_directory(directory=directory,path=path)
if __name__ == '__main__':
app.run(debug=True, threaded=True)