Init for REST service

This commit is contained in:
snegov committed 2020-05-11 22:05:09 +03:00
1 parent b7969005eb
commit 9264180a29
2 files changed
+17

No files matched your search

Executable
+1
View File
@@ -0,0 +1 @@
scp nertamid_rest_arm_linux blueberry:nertamid-rest/nertamid-rest
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/scanners", httpGetScanners)
log.Fatal(http.ListenAndServe(":8000", nil))
}
func httpGetScanners(res http.ResponseWriter, req *http.Request) {
fmt.Fprint(res, "Here will be scanners")
}