Initialise the module, write my first request

This commit is contained in:
Lewis Dale 2024-05-05 08:25:27 +01:00
parent e2067dfa78
commit a4bf9c140f
2 changed files with 15 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module lewisdale.dev/oopsie
go 1.22.2

12
main.go Normal file
View File

@ -0,0 +1,12 @@
package main
import (
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, World!"))
})
http.ListenAndServe(":8000", nil)
}