-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
34 lines (29 loc) · 726 Bytes
/
Copy pathmain.go
File metadata and controls
34 lines (29 loc) · 726 Bytes
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
package main
import (
"embed"
_ "embed"
"ev-plugin/backend/migrate"
"ev-plugin/backend/router"
"ev-plugin/frontend"
"flag"
"github.com/1340691923/eve-plugin-sdk-go/backend/plugin_server"
"github.com/1340691923/eve-plugin-sdk-go/build"
)
//go:embed plugin.json
var pluginJsonBytes []byte
//go:embed logo.png
var logoPng embed.FS
func main() {
flag.Parse()
plugin_server.Serve(plugin_server.ServeOpts{
Assets: &plugin_server.Assets{
PluginJsonBytes: pluginJsonBytes,
FrontendFiles: frontend.StatisFs,
Icon: logoPng,
},
Migration: &build.Gormigrate{Migrations: []*build.Migration{
migrate.V0_0_1(),
}}, //数据版本迁移
RegisterRoutes: router.NewRouter, //后端路由
})
}