Last active
November 14, 2019 23:11
-
-
Save peterjpxie/1c165e019957751eb96bdbe59188f810 to your computer and use it in GitHub Desktop.
flask_mock_simple_service
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
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