diff --git a/Dockerfile b/Dockerfile
index b4f5d42..93e299e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,6 +6,8 @@ WORKDIR /go/src/app
COPY go.mod go.sum main.go server.go ./
+ADD embed/ embed/
+
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
# Alpine
diff --git a/embed/embed.go b/embed/embed.go
new file mode 100644
index 0000000..02eed70
--- /dev/null
+++ b/embed/embed.go
@@ -0,0 +1,12 @@
+package embed
+
+import (
+ _ "embed"
+)
+
+//go:embed html/index.html
+var html_index string
+
+func ReadHtml() string {
+ return html_index
+}
diff --git a/embed/html/index.html b/embed/html/index.html
new file mode 100644
index 0000000..49fa95f
--- /dev/null
+++ b/embed/html/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+ AGECEM
+
+
+
+ Association Générale Étudiante du Cégep Édouard-Montpetit
+
+
diff --git a/main.go b/main.go
index 5c8ff3a..736ef31 100644
--- a/main.go
+++ b/main.go
@@ -1,5 +1,5 @@
package main
func main() {
- Execute()
+ Execute()
}
diff --git a/server.go b/server.go
index 0a7180d..7c52fee 100644
--- a/server.go
+++ b/server.go
@@ -3,24 +3,21 @@ package main
import (
"net/http"
+ "git.agecem.com/agecem/agecem-org/embed"
"github.com/labstack/echo/v4"
)
+var html string
+
+func init() {
+ html = embed.ReadHtml()
+}
+
func Execute() {
e := echo.New()
+
e.GET("/", func(c echo.Context) error {
- return c.HTML(http.StatusOK, `
-
-
- AGECEM
-
-
-
- # agecem.org
-
- `)
+ return c.HTML(http.StatusOK, html)
})
e.Logger.Fatal(e.Start(":8080"))
}