-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.py
49 lines (28 loc) · 788 Bytes
/
api.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
41
42
43
44
45
46
47
48
49
from User import allUsers,addUser,login,addComment,allComment
from Connect import *
#from flask_ngrok import run_with_ngrok
#run_with_ngrok(app)
#import tornado.web
#import tornado.ioloop
#from flask_cors import CORS
#import sys
allUsers
addUser
login
addComment
allComment
from flask import Flask
if __name__ == '__main__':
app.run(debug=True)
'''
import os
import sys
from wsgiref.simple_server import make_server
sys.path.insert(0, os.path.dirname(__file__))
def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
message = 'It works!\n'
version = 'Python v' + sys.version.split()[0] + '\n'
response = '\n'.join([message, version])
return [response.encode()]
'''