Skip to content

Commit a85dadc

Browse files
Add files via upload
1 parent 1495ae1 commit a85dadc

File tree

85 files changed

+5416
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5416
-0
lines changed

server/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from flask import *
2+
from flask_restful import *
3+
from pymongo import *
4+
import json
5+
from firebase import firebase
6+
7+
8+
def get_link():
9+
with open(
10+
"/home/indika/Programming/Projects/Python/Web-Dev/MCR-V4/private/mongodb-client.json"
11+
) as json_info:
12+
info = json.load(json_info)
13+
return info["MongoDB-Client-Url"]
14+
15+
16+
# Configing the web application
17+
app = Flask(__name__)
18+
app.debug = True
19+
app.secret_key = "--568963558fgdg85fbfd/8gf6bed8fgf6dbhde9rfg5sdf96eyhgr96f5hr9ehr--Ranuga D 2008--568963558fgdg85fbfd/8gf6bed8fgf6dbhde9rfg5sdf96eyhgr96f5hr9ehr--"
20+
api = Api(app)
21+
# COnfiging the databases
22+
firebase = firebase.FirebaseApplication(
23+
"https://my-class-room-v2.firebaseio.com/", None
24+
)
25+
link = get_link()
26+
try:
27+
cluster = MongoClient(link)
28+
except:
29+
cluster = MongoClient(link, connect=False)
30+
else:
31+
cluster = MongoClient(link, connect=True)
32+
from server.routes import *
995 Bytes
Binary file not shown.
1009 Bytes
Binary file not shown.
991 Bytes
Binary file not shown.
322 Bytes
Binary file not shown.
340 Bytes
Binary file not shown.
36.3 KB
Binary file not shown.
34.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)