summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran S. Diao <0@hairydiode.xyz>2019-11-22 15:45:02 -0800
committerHaoran S. Diao <0@hairydiode.xyz>2019-11-22 15:45:02 -0800
commit31ec2e49203c9dbfa6e3da999463def3d123d10b (patch)
treee78ad396797d51ac8429f2475f049d3a610a51f8
parentcf3d70c83aac587e31004c983748c35a56508ac1 (diff)
Added backend.go backend, right now just responds with a test string
-rw-r--r--backend.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/backend.go b/backend.go
new file mode 100644
index 0000000..7618d21
--- /dev/null
+++ b/backend.go
@@ -0,0 +1,17 @@
+package main;
+import (
+ "log"
+ "net/http"
+ "fmt"
+)
+
+func main() {
+ http.HandleFunc("/api/msg", messageHandler);
+ log.Fatal(http.ListenAndServeTLS(":6969",
+ "/etc/letsencrypt/live/ja.hairydiode.xyz/fullchain.pem",
+ "/etc/letsencrypt/live/hairydiode.xyz/privkey.pem",
+ nil));
+}
+func messageHandler(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, "肏");
+}