Dodaj 'main.go'

This commit is contained in:
Bartosz Kmieciak 2018-12-23 21:37:05 +00:00
parent 263ceb8fd2
commit 3e12cce3d8

22
main.go Normal file
View File

@ -0,0 +1,22 @@
package main
import (
"fmt"
"log"
"net/http"
)
func Strona1(w http.ResponseWriter, r *http.Request){
fmt.Fprintf(w, "Strona 1")
}
func HandleRequests(){
http.HandleFunc("/", Strona1)
log.Fatal(http.ListenAndServe(":8000", nil))
}
func main(){
HandleRequests()
}