Makefile refactoring and cleanup.
[pwl6.git] / rules / server.mk
diff --git a/rules/server.mk b/rules/server.mk
new file mode 100644 (file)
index 0000000..87964e7
--- /dev/null
@@ -0,0 +1,12 @@
+# This is free and unencumbered software released into the public
+# domain. To the extent possible under law, the author of this file
+# waives all copyright and related or neighboring rights to it.
+
+$(call include-once.,javascript.mk)
+
+HTTP_SERVER_PORT ?= 8000
+
+serve: | $(npmbindir)/http-server
+       $(npmbindir)/http-server $(@D) -p $(HTTP_SERVER_PORT) -c-1
+
+.PHONY: serve