27 lines
655 B
Python
27 lines
655 B
Python
"""Flask server for the vocoder back-end."""
|
|
|
|
from flask import Flask, render_template, request
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route("/")
|
|
def root():
|
|
"""Serve the main homepage."""
|
|
return render_template("index.html")
|
|
|
|
|
|
@app.route("/add-to-archive/", methods=["POST"])
|
|
def add_to_archive():
|
|
"""Accept audio recordings for archiving."""
|
|
# TODO: implement the saving of the files currently,
|
|
# I can't seem to get the file to send but the basic
|
|
# plumbing is in place
|
|
return ("faking it till we make it", 201)
|
|
|
|
|
|
@app.route("/archive/")
|
|
def archive():
|
|
"""Serve the archive listing."""
|
|
return render_template("archive.html")
|