generated from nyu-software-engineering/containerized-app-exercise
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f5e874
commit 203dc21
Showing
3 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
from flask import Flask, render_template, request, redirect, url_for, make_response, session | ||
"""Module designed to supplement front end webpage""" | ||
import os | ||
import datetime | ||
import sys | ||
from flask import ( | ||
Flask, | ||
render_template, | ||
request, | ||
redirect, | ||
url_for, | ||
make_response, | ||
session, | ||
) | ||
from pymongo import MongoClient | ||
import pymongo | ||
import datetime | ||
from bson.objectid import ObjectId | ||
import sys | ||
|
||
app = Flask('project4') | ||
app = Flask("project4") | ||
|
||
@app.route('/') | ||
def RootPage(): | ||
return render_template('root.html') | ||
|
||
@app.route('/anaylzeData', methods=['POST']) | ||
def anaylzeData(): | ||
@app.route("/") | ||
def root_page(): | ||
"""Root page route""" | ||
return render_template("root.html") | ||
|
||
|
||
@app.route("/analyze_data", methods=["POST"]) | ||
def anaylze_data(): | ||
"""Analyze data by sending it to the ml client""" | ||
return | ||
|
||
|
||
if __name__ == "__main__": | ||
PORT = os.getenv('PORT', 5000) | ||
app.run(debug=True,port=PORT) | ||
PORT = os.getenv("PORT", 5000) | ||
app.run(debug=True, port=PORT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
flask | ||
pymongo |