updating to use waitress
This commit is contained in:
parent
e71a8101e9
commit
f794d5de2c
2 changed files with 7 additions and 0 deletions
6
app/server.py
Normal file → Executable file
6
app/server.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
from flask import Flask, request, abort
|
from flask import Flask, request, abort
|
||||||
from voipms.api import Client
|
from voipms.api import Client
|
||||||
import did, sms
|
import did, sms
|
||||||
|
@ -28,3 +29,8 @@ def set_sms():
|
||||||
abort(403)
|
abort(403)
|
||||||
did = request.args.get('did')
|
did = request.args.get('did')
|
||||||
return sms.get_sms(client, did)
|
return sms.get_sms(client, did)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from waitress import serve
|
||||||
|
serve(app, host="0.0.0.0", port=8080)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
voipms-python
|
voipms-python
|
||||||
flask
|
flask
|
||||||
|
waitress
|
||||||
requests
|
requests
|
Loading…
Reference in a new issue