-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
30 lines (24 loc) · 860 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from flask import Flask, send_file, render_template, request, jsonify, send_from_directory
import json
from datetime import datetime
import os
app = Flask(__name__)
@app.route("/")
def hello_world():
return render_template("index.html")
# @app.route('/<path:path>')
# def send_js(path):
# return send_from_directory('templates/pedrotsividis.com/vgdl-games', path)
# @app.route("/users/<user_id>", methods=["POST"])
# def save(user_id):
# print("request.json")
# print(request)
# data = json.loads(request.data, strict=False)
# print(data)
# game_name = data["game_name"]
# directory = "october_traces/"+game_name # new_traces
# if not os.path.isdir(directory):
# os.mkdir(directory)
# with open(directory + "/TIME_" + str(datetime.now()) + ".json", 'w') as outfile:
# json.dump(json.dumps(data), outfile)
# return "True"