diff --git a/sample/src/binary-app/app b/sample/src/binary-app/app old mode 100644 new mode 100755 diff --git a/sample/src/binary-app/binary-app.py b/sample/src/binary-app/binary-app.py deleted file mode 100755 index 51bce0a..0000000 --- a/sample/src/binary-app/binary-app.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python3 - -# tile-generator -# -# Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -from wsgiref.simple_server import make_server - -def application(environ, start_response): - - # Sorting and stringifying the environment key, value pairs - response_body = ['%s: %s' % (key, value) - for key, value in sorted(environ.items())] - response_body = '\n'.join(response_body) - - status = '200 OK' - response_headers = [('Content-Type', 'text/plain'), - ('Content-Length', str(len(response_body)))] - start_response(status, response_headers) - - return [response_body] - -# Instantiate the WSGI server. -# It will receive the request, pass it to the application -# and send the application's response to the client -port = int(os.getenv('PORT', '8080')) -print('Run on port', port) -httpd = make_server( - '0.0.0.0', # The host name. - port, # A port number where to wait for the request. - application # Our application object name, in this case a function. - ) - -httpd.serve_forever()