summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cmd/main.go20
-rw-r--r--app/go.sum2
-rw-r--r--app/internal/.gitignore0
-rw-r--r--devenv.nix5
4 files changed, 27 insertions, 0 deletions
diff --git a/app/cmd/main.go b/app/cmd/main.go
new file mode 100644
index 0000000..c13de97
--- /dev/null
+++ b/app/cmd/main.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "net/http"
+)
+
+func init() {
+ // Initialize the application
+}
+
+func main() {
+
+ mux := http.NewServeMux()
+ // Start the application
+ mux.HandleFunc("GET /", func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte("Hello, World!"))
+ })
+
+ panic(http.ListenAndServe(":2030", mux))
+}
diff --git a/app/go.sum b/app/go.sum
new file mode 100644
index 0000000..e3078d7
--- /dev/null
+++ b/app/go.sum
@@ -0,0 +1,2 @@
+github.com/arangodb/go-driver/v2 v2.1.3 h1:PpLSe8E2RalFuqTGi2yfHDe3ltOomfFCIToB66p1lr8=
+github.com/arangodb/go-driver/v2 v2.1.3/go.mod h1:aoDzrsO7PQEFat3Q9pp4zfv6W+WotA7GcCeJQJfX+tc=
diff --git a/app/internal/.gitignore b/app/internal/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/internal/.gitignore
diff --git a/devenv.nix b/devenv.nix
index 9c69aee..469c127 100644
--- a/devenv.nix
+++ b/devenv.nix
@@ -44,5 +44,10 @@
make -j$NIX_BUILD_CORES
'';
+ scripts.start.exec = ''
+ cd app
+ go run cmd/main.go
+ '';
+
# Supprimer la configuration brew inutile dans Nix
}