From 40407573e35ff9b617faf84ac715de3d791282e4 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Mon, 25 Jul 2022 00:46:34 +0200 Subject: ref: Build the whole application in one bin To make easier to distribute midr all the binaries will embedded into the final build. --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index d47424f..c763c5a 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "embed" "fmt" "git.sr.ht/~gabrielgio/midr/db" @@ -9,8 +10,11 @@ import ( var Version = "development" +//go:embed assets/* templates/* +var f embed.FS + func main() { fmt.Println("Version:\t", Version) db.ConnectDb() - routes.HandleRequests() + routes.HandleRequests(f) } -- cgit v1.2.3