@Lolanator365/

Python3 flask server

Python

flask server

fork
loading
Files
  • main.py
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from flask import Flask, request
import os
app = Flask(__name__)

@app.route('/')
def hello_world():
  return 'Hello, Jorge!'

@app.route('/secure-page')
def secret_route():
  password = request.args.get('secret')
  if (password == os.environ['PASSWORD']):
    return 'You found the secret!'
  else:
    return 'Wrong password!'

if __name__ == '__main__':
  app.run(host='0.0.0.0', port=8080)