-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.py
43 lines (32 loc) · 1.19 KB
/
server.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
31
32
33
34
35
36
37
38
39
40
41
42
43
from flask import Flask, send_from_directory
import random
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyDaU-LHpozaLTKqFpftegL0Wq18uqeIg1k",
authDomain: "titan-software-beta.firebaseapp.com",
databaseURL: "https://titan-software-beta-default-rtdb.firebaseio.com",
projectId: "titan-software-beta",
storageBucket: "titan-software-beta.appspot.com",
messagingSenderId: "1004416146288",
appId: "1:1004416146288:web:cd338a8694a1ba96b64db5"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
app = Flask(__name__)
# Path for our main Svelte page
@app.route("/")
def base():
return send_from_directory('client/public', 'index.html')
# Path for all the static files (compiled JS/CSS, etc.)
@app.route("/<path:path>")
def home(path):
return send_from_directory('client/public', path)
@app.route("/rand")
def hello():
return str(random.randint(0, 100))
if __name__ == "__main__":
app.run(debug=True)