25 lines
353 B
Python
25 lines
353 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
from flask import Flask
|
||
|
from flask_restful import Resource, Api
|
||
|
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
api = Api(app)
|
||
|
|
||
|
|
||
|
class Game(Resource):
|
||
|
def get(self):
|
||
|
return {'hello': 'world'}
|
||
|
|
||
|
|
||
|
api.add_resource(Game, '/game')
|
||
|
|
||
|
@app.route("/")
|
||
|
def high_score():
|
||
|
return "High score!"
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
app.run(port='5002')
|