File size: 792 Bytes
6e74f54
 
 
 
 
 
 
 
 
 
 
 
1dfc78d
6e74f54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ec1d09e
 
 
c71cc99
ec1d09e
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
import os
from flask import Flask, render_template, request, jsonify

# Gets the absolute path of the directory containing app.py
base_dir = os.path.dirname(os.path.abspath(__file__))

app = Flask(
    __name__, 
    template_folder=os.path.join(base_dir, 'templates'),
    static_folder=os.path.join(base_dir, 'static')
)


@app.route('/')
def home():
    return render_template('index.html')

@app.route('/about')
def about():
    return render_template('about.html')

@app.route('/services')
def services():
    return render_template('services.html')

@app.route('/contact')
def contact():
    return render_template('contact.html')

import os

if __name__ == "__main__":
    port = int(os.environ.get("PORT", 7860))
    app.run(host="0.0.0.0", port=port)