
+++ app.py
... | ... | @@ -0,0 +1,27 @@ |
1 | +from flask import Flask | |
2 | +from flask_restx import Api | |
3 | +from auth import Auth | |
4 | +from action import Action | |
5 | + | |
6 | +app = Flask(__name__) | |
7 | + | |
8 | + | |
9 | +print("Api Start") | |
10 | +api = Api( app, | |
11 | + version='0.1', | |
12 | + title="trafficagent", | |
13 | + description="API Server", | |
14 | + terms_url="/", | |
15 | + contact="[email protected]", | |
16 | + license="MIT") | |
17 | + | |
18 | + | |
19 | + | |
20 | +api.add_namespace(Auth, '/auth') | |
21 | +print("Api Add Auth") | |
22 | + | |
23 | +api.add_namespace(Action, '/action') | |
24 | + | |
25 | +if __name__ == "__main__": | |
26 | + app.run(debug=False, host='0.0.0.0', port=8080) | |
27 | + print("Flask Start")(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?