2018-06-20 00:52:54 +02:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import requests
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2019-06-23 15:39:13 +02:00
|
|
|
port = os.getenv("PORT", 8000)
|
|
|
|
res = requests.get(f"http://127.0.0.1:{port}/")
|
2018-06-20 00:52:54 +02:00
|
|
|
if res.status_code >= 400:
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
2019-06-23 15:39:13 +02:00
|
|
|
if __name__ == "__main__":
|
2018-06-20 00:52:54 +02:00
|
|
|
main()
|