comparison weather_server/server.py @ 5:368f732f13d0

Actually make the server runnable.
author Paul Fisher <paul@pfish.zone>
date Sun, 29 Sep 2019 15:14:30 -0400
parents e7c8dcc5fc15
children d54155a199d8
comparison
equal deleted inserted replaced
4:e7c8dcc5fc15 5:368f732f13d0
1 import hmac 1 import hmac
2 import sys
2 3
3 import bson 4 import bson
4 import flask 5 import flask
5 6
6 from . import common 7 from . import common
68 return app 69 return app
69 70
70 71
71 def main(argv): 72 def main(argv):
72 """Main function for a simple local demo.""" 73 """Main function for a simple local demo."""
73 app = server.build_app(argv[0]) 74 app = build_app(argv[0])
74 app.run(host='0.0.0.0') 75 app.run(host='0.0.0.0')
75 76
76 77
77 if __name__ == '__main__': 78 if __name__ == '__main__':
78 main(sys.argv[1:]) 79 main(sys.argv[1:])