You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
340 B
Python
19 lines
340 B
Python
import logging
|
|
|
|
from flask import Flask, request
|
|
|
|
log = logging.getLogger(__name__)
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route('/')
|
|
def index():
|
|
log.warning('Got a request from: {}'.format(request.remote_addr))
|
|
return {'msg': 'pong simple1'}
|
|
|
|
|
|
if __name__ == '__main__':
|
|
app.run(host='0.0.0.0')
|