Commit 329c66c6 authored by Christian Wander's avatar Christian Wander
Browse files

moving towards webapp

parent d9bbad13
.vscode
__pycache__/
venv
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def hell_world():
name = "foo"
return render_template('hello.html', name=name)
......@@ -10,6 +10,30 @@ run app:
python3 dmxfun.py
```
## webapp
In the project directory, create a virtual environment:
```
python3 -m venv venv
```
activate the environment
```
. venv/bin/activate
```
install flask
```
pip install Flask
```
Activate the env in vscode also: ctrl-shift-p, "Python: Select Interpreter"
## todo
* Deal with smaller images (e.g. snakify is broken with 10x10)
......
<!doctype html>
<title>Pixelfun</title>
{% if name %}
<h1>Hello {{ name }}!</h1>
{% else %}
<h1>Hello, World!</h1>
{% endif %}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment