repl.it
Python

No description

fork
loading
Files
  • main.py
  • templates
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from random import choice, randint
from flask import Flask, render_template

app = Flask(__name__)

greetings = (
  'You will prosper',
  'Your oven door is open',
  'There is a monkey in your yard'
)

@app.route('/greeting')
def index():
  return choice(greetings)

@app.route('/')
def number():
  return render_template('numbers.html', number = randint(1e24, 1e200))

app.run(host='0.0.0.0')
Fetching token
?