initial commit
This commit is contained in:
16
backend/main.go
Normal file
16
backend/main.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/api/hello", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, `{"message": "Hello World from Go!"}`)
|
||||
})
|
||||
|
||||
log.Println("Backend running on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
Reference in New Issue
Block a user