-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
1 changed file
with
11 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
from pathlib import Path | ||
import sys | ||
from flask import Flask | ||
import iop_python as iop | ||
path_root = Path(__file__).parents[2] | ||
sys.path.append(str(path_root)) | ||
|
||
from keys.main import load_priv_key, load_pub_key | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/') | ||
def hello_world(): | ||
priv_key = load_priv_key("keys/private.pem") | ||
pub_key = load_pub_key("keys/public.pem") | ||
print(priv_key) | ||
print(pub_key) | ||
return iop.generate_phrase() | ||
|
||
if __name__ == '__main__': | ||
app.run(host='0.0.0.0', port=5000) | ||
app.run(host='0.0.0.0', port=8080, debug=True) |