mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-24 00:24:06 +03:00
DB query refactoring
This commit is contained in:
parent
7c3cac8084
commit
38c1f3a302
3 changed files with 216 additions and 154 deletions
10
main.go
10
main.go
|
@ -1,11 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/handler"
|
||||
"github.com/ngoduykhanh/wireguard-ui/router"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// initialize DB
|
||||
err := util.InitDB()
|
||||
if err != nil {
|
||||
fmt.Print("Cannot init database: ", err)
|
||||
}
|
||||
|
||||
// register routes
|
||||
app := router.New()
|
||||
|
||||
app.GET("/", handler.WireGuardClients())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue