Skip to content

Instantly share code, notes, and snippets.

@Skorkmaz88
Created February 5, 2019 16:19
Show Gist options
  • Select an option

  • Save Skorkmaz88/b60d10b7ade07b5971c13c5b67447a6d to your computer and use it in GitHub Desktop.

Select an option

Save Skorkmaz88/b60d10b7ade07b5971c13c5b67447a6d to your computer and use it in GitHub Desktop.
from flask import Flask, jsonify
import simplejson as json
app = Flask(__name__)
@app.route('/heartbeat', methods=['GET', 'POST'])
def heart_beat():
""" Returns when server is alive """
return json.dumps( {"test": "ML server is alive"})
if __name__ == '__main__':
app.run(debug=True, port=5002, host="0.0.0.0")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment