configurable port plus support for SSL

This commit is contained in:
azivner
2017-08-14 21:05:01 -04:00
parent f80f073874
commit 3c924afbca
7 changed files with 41 additions and 8 deletions

View File

@@ -42,6 +42,10 @@ config.read('config.ini')
user = User()
user.id = config['Login']['username']
port = config['Network']['port']
certPath = config['Network']['certPath']
certKeyPath = config['Network']['certKeyPath']
hashedPassword = config['Login']['password-hash'].encode('utf-8')
@app.route('/login', methods=['POST'])
@@ -85,5 +89,5 @@ def load_user(user_id):
api.add_resource(Notes, '/notes/<string:note_id>')
if __name__ == '__main__':
app.run(host='0.0.0.0')
if __name__ == "__main__":
app.run(host='0.0.0.0', port=port, ssl_context = (certPath, certKeyPath))