Skip to content

Commit a8d166f

Browse files
committed
fix ENV directive in dockerfile + add message
1 parent 649019e commit a8d166f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM golang:latest
22

3-
ENV PORT
43

54
ENV GO111MODULE=on
65

apihandler/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package apihandler
33
import (
44
"encoding/json"
55
"fmt"
6+
"log"
67
"net/http"
78

89
"github.com/gorilla/mux"
910
db "primitivo.fr/applinh/GoFire/db"
1011
)
1112

1213
func HomeHandler(w http.ResponseWriter, r *http.Request) {
13-
fmt.Println("ok")
14+
log.Println("Your request has been correctly received on GET /")
1415
}
1516

1617
func GET_ResHandler(w http.ResponseWriter, r *http.Request) {

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ func main() {
3333
r.HandleFunc("/{res}", api.POST_ResHandler).Methods("POST")
3434
r.HandleFunc("/{res}/{id}", api.PATCH_ResHandler).Methods("PATCH")
3535

36+
log.Println("Starting FireGo on port " + port)
37+
3638
log.Fatal(http.ListenAndServe("0.0.0.0:"+port, r))
3739

3840
}

0 commit comments

Comments
 (0)