Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aem_server.py #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions aem_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
import argparse

class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):

Expand Down Expand Up @@ -36,14 +37,17 @@ def do_GET(self):
return


def run():
def run(port=80):
print('starting fake AEM server...')

server_address = ('0.0.0.0', 80)
server_address = ('0.0.0.0', port)
httpd = HTTPServer(server_address, testHTTPServer_RequestHandler)
print('running server...')
print('running server on port {}'.format(port))
httpd.serve_forever()


if __name__ == '__main__':
run()
parser = argparse.ArgumentParser(description='Fake AEM server')
parser.add_argument('--port', type=int, default=80, help='port to listen on')
args = parser.parse_args()
run(args.port)