Skip to content

Commit

Permalink
Fix mockserver (electricitymaps#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio authored Jan 7, 2018
1 parent e11cc07 commit cd5fafd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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)

0 comments on commit cd5fafd

Please sign in to comment.