浏览代码

flask serve from js_client, spelling

master
jfinn 1年前
父节点
当前提交
46cec78d2b
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 2
    2
      README.md
  2. 5
    4
      flask_server/app.py

+ 2
- 2
README.md 查看文件

1
 # <p align="center">jsyncdb</p>
1
 # <p align="center">jsyncdb</p>
2
 
2
 
3
-Jsyncdb synchronizes json compatable javascript objects
4
-This will be a mono repo for jsyncdb clients and servers
3
+Jsyncdb synchronizes json compatible javascript objects
4
+This will be a monorepo for jsyncdb clients and servers
5
 
5
 
6
 **Author:** 
6
 **Author:** 
7
 [Joseph Innace](https://github.com/JInnace)
7
 [Joseph Innace](https://github.com/JInnace)

+ 5
- 4
flask_server/app.py 查看文件

35
 @app.route('/')
35
 @app.route('/')
36
 def index():
36
 def index():
37
 	print("::::::::::::::;")
37
 	print("::::::::::::::;")
38
-	# return render_template('jsyncdb_index_v5.html')
38
+	return render_template('jsyncdb_index_v5.html')
39
 	return render_template('index.html')
39
 	return render_template('index.html')
40
 
40
 
41
 # r'''
41
 # r'''
42
 @app.route('/shared_libs/<path:path>')
42
 @app.route('/shared_libs/<path:path>')
43
 def send_report2(path):
43
 def send_report2(path):
44
-	return flask.send_file('templates/jquery-3.5.1.min.js')
44
+	return flask.send_file('../js_client/jquery-3.5.1.min.js')
45
 
45
 
46
 @app.route('/<path:path>')
46
 @app.route('/<path:path>')
47
 def send_report(path):
47
 def send_report(path):
48
-	return flask.send_from_directory('templates', path)
49
-	# return flask.send_from_directory('./', path)
48
+	# return flask.send_from_directory('templates', path)
49
+	return flask.send_from_directory(r"../js_client", path)
50
+	return flask.send_from_directory('./', path)
50
 # '''
51
 # '''
51
 
52
 
52
 
53
 

正在加载...
取消
保存