Skip to content

Commit

Permalink
Remove public folder references (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed Dec 2, 2019
1 parent fff914e commit 6419225
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ lib-profile:
sudo py-spy -F -f profile.svg -d 3600 proxy.py

dashboard:
pushd dashboard && npm run build && popd && ln -s $(PWD)/dashboard/public/dashboard $(PWD)/public/dashboard
pushd dashboard && npm run build && popd

dashboard-clean:
if [[ -d public/dashboard ]]; then rm -rf public/dashboard; fi
if [[ -d dashboard/public ]]; then rm -rf dashboard/public; fi

container:
docker build -t $(LATEST_TAG) -t $(IMAGE_TAG) .
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,8 @@ optional arguments:
Default: False. Enable inbuilt static file server.
Optionally, also use --static-server-dir to serve
static content from custom directory. By default,
static file server serves from public folder.
static file server serves out of installed proxy.py
python module folder.
--enable-web-server Default: False. Whether to enable
proxy.HttpWebServerPlugin.
--hostname HOSTNAME Default: ::1. Server IP address.
Expand Down
3 changes: 1 addition & 2 deletions proxy/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
DEFAULT_PLUGINS = ''
DEFAULT_PORT = 8899
DEFAULT_SERVER_RECVBUF_SIZE = DEFAULT_BUFFER_SIZE
DEFAULT_STATIC_SERVER_DIR = os.path.join(
os.path.dirname(PROXY_PY_DIR), 'public')
DEFAULT_STATIC_SERVER_DIR = PROXY_PY_DIR
DEFAULT_THREADLESS = False
DEFAULT_TIMEOUT = 10
DEFAULT_VERSION = False
2 changes: 1 addition & 1 deletion proxy/common/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def init_parser() -> argparse.ArgumentParser:
help='Default: False. Enable inbuilt static file server. '
'Optionally, also use --static-server-dir to serve static content '
'from custom directory. By default, static file server serves '
'from public folder.'
'out of installed proxy.py python module folder.'
)
parser.add_argument(
'--enable-web-server',
Expand Down
2 changes: 1 addition & 1 deletion proxy/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def __exit__(
self.conn.close()

def __call__(self, func: Callable[..., Any]
) -> Callable[[socket.socket], Any]:
) -> Callable[[Tuple[Any, ...], Dict[str, Any]], Any]:
@functools.wraps(func)
def decorated(*args: Any, **kwargs: Any) -> Any:
with self as conn:
Expand Down
Empty file removed public/.gitkeep
Empty file.

0 comments on commit 6419225

Please sign in to comment.