aboutsummaryrefslogtreecommitdiff
path: root/server/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'server/Makefile')
-rw-r--r--server/Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/server/Makefile b/server/Makefile
new file mode 100644
index 0000000..6f1388c
--- /dev/null
+++ b/server/Makefile
@@ -0,0 +1,50 @@
+.PHONY: all compile clean test test-unit test-prop test-perf run console release
+
+REBAR = rebar3
+
+all: compile
+
+compile:
+ $(REBAR) compile
+
+clean:
+ $(REBAR) clean
+ rm -rf _build
+
+test: test-unit test-prop test-perf
+
+test-unit:
+ $(REBAR) ct --suite=jchat_SUITE
+
+test-prop:
+ $(REBAR) as test ct --suite=jchat_prop_SUITE
+
+test-perf:
+ $(REBAR) as test ct --suite=jchat_perf_SUITE
+
+run:
+ $(REBAR) shell --name jchat@localhost
+
+console: compile
+ $(REBAR) shell --apps jchat
+
+release:
+ $(REBAR) as prod release
+
+dialyzer:
+ $(REBAR) dialyzer
+
+# Development helpers
+dev-setup:
+ mkdir -p log data
+ $(REBAR) get-deps compile
+
+format:
+ $(REBAR) fmt
+
+# Docker support
+docker-build:
+ docker build -t jchat:latest .
+
+docker-run:
+ docker run -p 8080:8080 jchat:latest