add readme
This commit is contained in:
25
README.md
25
README.md
@@ -1,2 +1,27 @@
|
||||
# flask-beertap
|
||||
|
||||
## How to run
|
||||
|
||||
If you want a production environment set up your `.env` to provide an app key.
|
||||
|
||||
```python
|
||||
pipenv install
|
||||
pipenv run python main.py
|
||||
chromium-browser 127.0.0.1:5000
|
||||
```
|
||||
|
||||
## gpio handler
|
||||
|
||||
Takes care of the needed raspberry pi gpio functions.
|
||||
|
||||
```python
|
||||
from gpio_handler import create_output
|
||||
|
||||
out = create_output()
|
||||
out.gpio_test()
|
||||
out.gpio_set_pulse(channel=1, time_on=2)
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
Aaron Schmocker <schmocker@puzzle.ch>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
from flask import Flask
|
||||
from .views import views
|
||||
|
||||
flask_app_secret = os.environ.get('APP_SECRET', 'changeme')
|
||||
|
||||
@@ -10,9 +11,6 @@ def create_app():
|
||||
'''
|
||||
app = Flask(__name__)
|
||||
app.config['SECRET_KEY'] = flask_app_secret
|
||||
|
||||
from .views import views
|
||||
|
||||
app.register_blueprint(views, url_prefix='/')
|
||||
|
||||
return app
|
||||
|
||||
@@ -11,6 +11,7 @@ tap_right=20
|
||||
|
||||
# create ouput handler
|
||||
output = create_output()
|
||||
output.gpio_test()
|
||||
|
||||
@views.route('/', methods=['GET'])
|
||||
def render():
|
||||
|
||||
Reference in New Issue
Block a user