feat: Implement Flask server with /cast POST endpoint
This commit is contained in:
parent
6f112c0043
commit
c2382ab082
15
main.py
15
main.py
|
@ -9,3 +9,18 @@ def main():
|
|||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
import logging
|
||||
from flask import Flask, request
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/cast', methods=['POST'])
|
||||
def cast_spell():
|
||||
logging.info(f"Received POST request on /cast. Request data: {request.data}")
|
||||
return "Cast successful!", 200
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user