aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-07-25 00:46:34 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-07-25 00:46:34 +0200
commit40407573e35ff9b617faf84ac715de3d791282e4 (patch)
treef2f1483b20751a41aaa978761567be798d61cc5d /main.go
parentcab4432ec6a3e93286f219a8e6df0c7a57682c5d (diff)
downloadmdir-40407573e35ff9b617faf84ac715de3d791282e4.tar.gz
mdir-40407573e35ff9b617faf84ac715de3d791282e4.tar.bz2
mdir-40407573e35ff9b617faf84ac715de3d791282e4.zip
ref: Build the whole application in one bin
To make easier to distribute midr all the binaries will embedded into the final build.
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
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)
}