-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
32 lines (23 loc) · 929 Bytes
/
main.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
import projects #projects definitions are placed in different file
# https://flask.palletsprojects.com/en/1.1.x/api/
from flask import Flask, render_template
#create a Flask instance
app = Flask(__name__)
#connects default URL of server to render home.html
@app.route('/')
def home_route():
return render_template("home.html", projects=projects.setup())
#connects /hello path of server to render apcsp.html
@app.route('/apcsp')
def apguidelines():
return render_template("apcsp.html", projects=projects.setup())
#connects /dnhscsp path of server to render dnhscsp.html
@app.route('/delnorteapcompsci')
def dnhscsp():
return render_template("dnhscsp.html", projects=projects.setup())
@app.route('/home')
def home():
return render_template("home.html", projects=projects.setup())
if __name__ == "__main__":
#runs the application on the repl development server
app.run(port='3000', host='0.0.0.0')