Created
October 12, 2020 01:00
-
-
Save ryanbekabe/85f69d4545ad1f151587c97eace8904c to your computer and use it in GitHub Desktop.
Pyton Flask with SSL Let's Encrypt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Pyton Flask with SSL Let's Encrypt | |
#Source: https://bits.mdminhazulhaque.io/python/run-flask-app-with-let's-encrypt-ssl-certificate.html | |
import requests | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/', methods=['GET']) | |
def serve(): | |
return "Hello world", 200 | |
if __name__ == '__main__': | |
app.run(host="107.173.229.88", port=8080, ssl_context=('/etc/letsencrypt/live/hanyajasacom.rek.my.id/fullchain.pem', '/etc/letsencrypt/live/hanyajasacom.rek.my.id/privkey.pem')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment