Skip to content

Instantly share code, notes, and snippets.

@peterjpxie
Last active November 14, 2019 23:11
Show Gist options
  • Save peterjpxie/1c165e019957751eb96bdbe59188f810 to your computer and use it in GitHub Desktop.
Save peterjpxie/1c165e019957751eb96bdbe59188f810 to your computer and use it in GitHub Desktop.
flask_mock_simple_service
from flask import Flask
app = Flask(__name__)
@app.route('/json', methods=['POST', 'GET'])
def test_json():
return '{"code": 1, "message": "Hello, World!" }'
# Run in HTTP
app.run(host='127.0.0.1', port='5000')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment