commit b455eabb7991e5025234bbbfd8628f04e83d192d Author: Zoe Roux Date: Fri Sep 15 23:06:38 2023 +0200 Init go api diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e69de29 diff --git a/api/go.mod b/api/go.mod new file mode 100644 index 0000000..5a3898c --- /dev/null +++ b/api/go.mod @@ -0,0 +1,3 @@ +module tide/api + +go 1.20 diff --git a/api/main.go b/api/main.go new file mode 100644 index 0000000..22c1909 --- /dev/null +++ b/api/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + "net/http" +) + +func main() { + http.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) { + fmt.Println("test") + }) + http.ListenAndServe(":7890", nil) +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b0c9acf --- /dev/null +++ b/shell.nix @@ -0,0 +1,6 @@ +{pkgs ? import {}}: +pkgs.mkShell { + packages = with pkgs; [ + go + ]; +}