From 8bafbdd4b7abeaaab331423c9d216f933f8dd831 Mon Sep 17 00:00:00 2001 From: engigu Date: Tue, 2 Jan 2024 14:54:10 +0800 Subject: [PATCH] feat: add conf/app.ini --- .gitignore | 2 +- conf/app.example.ini | 20 ++++++++++++++++++++ pkg/setting/setting.go | 1 - 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 conf/app.example.ini diff --git a/.gitignore b/.gitignore index fb15e1d..e9b893f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,6 @@ go.work # Project ignore /test -/conf +/conf/app.ini /runtime .idea/ diff --git a/conf/app.example.ini b/conf/app.example.ini new file mode 100644 index 0000000..d6e3f3c --- /dev/null +++ b/conf/app.example.ini @@ -0,0 +1,20 @@ +[app] +JwtSecret = message-nest +RuntimeRootPath = runtime/ + +[server] +; debug or release +RunMode = release +HttpPort = 8000 +ReadTimeout = 60 +WriteTimeout = 60 +; use embed html static file +; EmbedHtml = disable + +[database] +Type = mysql +User = root +Password = password +Host = 123.1.1.1 +Name = db_name +TablePrefix = message_ diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index e55634e..6bac521 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -9,7 +9,6 @@ import ( type App struct { JwtSecret string - PrefixUrl string RuntimeRootPath string }