20 lines
413 B
Python
Executable File
20 lines
413 B
Python
Executable File
#!/usr/bin/env python
|
|
# coding: utf-8
|
|
|
|
from flask import Flask, request
|
|
import json
|
|
|
|
app = Flask(__name__, static_url_path='')
|
|
|
|
@app.route('/', methods=['GET'])
|
|
def index():
|
|
return app.send_static_file('index.html')
|
|
|
|
@app.route('/inscription', methods=['POST'])
|
|
def inscription():
|
|
print request.data
|
|
sortie = json.dumps({"data":"OK"})
|
|
return sortie
|
|
|
|
app.run(host="0.0.0.0", debug=True, port=8080)
|