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

Fix mockserver #982

Merged
merged 1 commit into from
Jan 7, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.2'
services:
mockserver:
build: mockserver
ports: ['9000:9000']
ports: ['9000:8000']
volumes:
- './mockserver/public:/home/public'
- './mockserver/server.py:/home/server.py'
Expand Down
4 changes: 2 additions & 2 deletions mockserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.6
WORKDIR /home
EXPOSE 9000
EXPOSE 8000
ADD server.py server.py
CMD cd public && python ../server.py 9000
CMD cd public && python ../server.py
4 changes: 2 additions & 2 deletions mockserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Usage: python __file__.py <port>

from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer
from http.server import SimpleHTTPRequestHandler, HTTPServer, test

class CORSRequestHandler(SimpleHTTPRequestHandler):
def do_OPTIONS(self):
Expand All @@ -15,4 +15,4 @@ def end_headers(self):
SimpleHTTPRequestHandler.end_headers(self)

if __name__ == '__main__':
BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer)
test(CORSRequestHandler, HTTPServer)