chore: cleanups and docs
This commit is contained in:
parent
5a9f05ccc9
commit
a49ebfb76d
2 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,12 @@ poetry run gunicorn -w 1 'phomeme:app' -b [::0]
|
|||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Visit the awesome frontend on http://localhost:8000 or send via curl
|
||||
using `curl -v -F image=@image.pdf localhost:5000/print`.
|
||||
|
||||
## Credits
|
||||
|
||||
Heavily based on [SFZ-aalen][1]
|
||||
|
|
|
@ -8,6 +8,7 @@ from flask_cors import CORS
|
|||
|
||||
DEVICE = "B9:26:5A:67:50:49"
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["MAX_CONTENT_LENGTH"] = 40 * 1024 * 1024
|
||||
app.config["UPLOAD_FOLDER"] = "uploads"
|
||||
|
@ -38,6 +39,7 @@ def handle_image():
|
|||
print_image = PrintImage(img)
|
||||
print_image.print()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return f"Error printing image: {e}", 500
|
||||
|
||||
return "ok", 200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue