-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
42 lines (33 loc) · 842 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"embed"
"github.com/bitwormhole/starter"
"github.com/bitwormhole/starter/application"
"github.com/bitwormhole/starter/collection"
wpmmix "github.com/bitwormhole/wpm-mix"
"github.com/bitwormhole/wpm/server/service"
)
const (
theModuleName = "github.com/bitwormhole/wpm-app"
theModuleVersion = "v0.0.2"
theModuleRevision = 2
theModuleResPath = "src/main/resources"
)
//go:embed "src/main/resources"
var theModuleResFS embed.FS
func main() {
res := collection.LoadEmbedResources(&theModuleResFS, theModuleResPath)
// module
mb := application.ModuleBuilder{}
mb.Name(theModuleName)
mb.Version(theModuleVersion)
mb.Revision(theModuleRevision)
mb.Resources(res)
mb.Dependency(wpmmix.Module())
m := mb.Create()
service.SetAppModule(m)
// run
i := starter.InitApp()
i.UseMain(m)
i.Run()
}