Init for REST service

This commit is contained in:
Maks Snegov 2020-05-11 22:05:09 +03:00
parent b7969005eb
commit 9264180a29
2 changed files with 17 additions and 0 deletions

1
rest/deploy.sh Executable file
View File

@ -0,0 +1 @@
scp nertamid_rest_arm_linux blueberry:nertamid-rest/nertamid-rest

16
rest/main.go Normal file
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")
}