blob: aaa41228dfd8ae041fb425e391c0c22b474eebd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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/ja.hairydiode.xyz/privkey.pem",
nil));
}
func messageHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
fmt.Fprintf(w, "1574466927");
}
|