Add a rule to start a web server for serving the current directory

This commit is contained in:
Carsten Grohmann 2017-11-29 20:10:25 +01:00
parent 044a152f28
commit b8ec3c720e

View File

@ -10,7 +10,7 @@
SHELL = /bin/sh SHELL = /bin/sh
BASE_DIR = . BASE_DIR = .
PYTHON_BIN = python3 PYTHON3_BIN = python3
VIRTUAL_ENV = env VIRTUAL_ENV = env
export VIRTUAL_ENV := $(abspath ${VIRTUAL_ENV}) export VIRTUAL_ENV := $(abspath ${VIRTUAL_ENV})
@ -63,3 +63,7 @@ venv-clean:
build: venv build: venv
. $(VIRTUAL_ENV)/bin/activate . $(VIRTUAL_ENV)/bin/activate
transcrypt --build --map --nomin -e 6 OOMAnalyser.py transcrypt --build --map --nomin -e 6 OOMAnalyser.py
#+ Serve the current directory on http://127.0.0.1:8080
websrv:
$(PYTHON3_BIN) -m http.server 8080 --bind 127.0.0.1