From ea4bcb4aaff9fb71dc2f968c39cac48cabd457b3 Mon Sep 17 00:00:00 2001 From: liburdi Date: Tue, 22 Oct 2024 12:17:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20reamdme=E9=87=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E6=BA=90=E7=A0=81=E5=90=AF=E5=8A=A8=E5=91=BD=E4=BB=A4=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E5=A4=B1=E6=95=88=EF=BC=8C=E5=9B=A0=E4=B8=BAui/dist?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E4=BB=A3=E7=A0=81=E4=BB=93=E5=BA=93=E4=B8=AD?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 3 +++ README.md | 3 +-- README_EN.md | 3 +-- main.go | 6 +++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7c2f0d6d..af32f777 100644 --- a/Makefile +++ b/Makefile @@ -35,3 +35,6 @@ help: @echo " make help - 显示此帮助信息" .PHONY: all build clean help + +local.run: + go mod vendor&& npm --prefix ./ui install && npm --prefix ./ui run build && go run main.go serve diff --git a/README.md b/README.md index cb3b0b29..3f5ef4fc 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,7 @@ mkdir -p ~/.certimate && cd ~/.certimate && curl -O https://raw.githubuserconten ```bash git clone EMAIL:usual2970/certimate.git cd certimate -go mod vendor -go run main.go serve +make local.run ``` ## 二、使用 diff --git a/README_EN.md b/README_EN.md index d048cecb..f8923c44 100644 --- a/README_EN.md +++ b/README_EN.md @@ -54,8 +54,7 @@ mkdir -p ~/.certimate && cd ~/.certimate && curl -O https://raw.githubuserconten ```bash git clone EMAIL:usual2970/certimate.git cd certimate -go mod vendor -go run main.go serve +make local.run ``` ## Usage diff --git a/main.go b/main.go index 7a0bf641..3cd0bd06 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,6 @@ package main import ( - "github.com/usual2970/certimate/ui" "log" "os" "strings" @@ -16,6 +15,7 @@ import ( "github.com/usual2970/certimate/internal/domains" "github.com/usual2970/certimate/internal/routes" "github.com/usual2970/certimate/internal/utils/app" + "github.com/usual2970/certimate/ui" _ "time/tzdata" ) @@ -46,6 +46,10 @@ func main() { return nil }) + defer log.Println("Exit!") + go func() { + log.Println("Visit the website:", "http://127.0.0.1:8090") + }() if err := app.Start(); err != nil { log.Fatal(err)