Last active
          January 15, 2020 12:31 
        
      - 
      
- 
        Save akleemans/1dbead8fcf12238ae5787cdf84c333c6 to your computer and use it in GitHub Desktop. 
    Simple flask web server
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | # install flask | |
| sudo pip3 install flask | |
| # run script | |
| python3 server.py | 
  
    
      This file contains hidden or 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('/test', methods=['GET']) | |
| def get_test_data(): | |
| return 'Request worked.' | |
| if __name__ == "__main__": | |
| app.run() | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment