Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ppt_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Li Feifei
ppt_server
Commits
e1faaea6
Commit
e1faaea6
authored
Aug 11, 2021
by
Li Feifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用环境变量
parent
154468d2
Pipeline
#15866
passed with stages
in 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
boot.go
boot/boot.go
+11
-0
config.toml
config/config.toml
+0
-1
No files found.
boot/boot.go
View file @
e1faaea6
package
boot
import
(
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"os"
)
func
init
()
{
link
:=
fmt
.
Sprintf
(
"mysql:%s:%s@tcp(%s:3306)/xyu"
,
os
.
Getenv
(
"read_user"
),
os
.
Getenv
(
"read_pass"
),
os
.
Getenv
(
"read_sql"
))
_
=
g
.
Config
()
.
Set
(
"database.link"
,
link
)
g
.
Server
()
.
SetNameToUriType
(
ghttp
.
URI_TYPE_CAMEL
)
g
.
Log
()
.
SetAsync
(
true
)
...
...
config/config.toml
View file @
e1faaea6
...
...
@@ -28,7 +28,6 @@
# Database.
[database]
link
=
"mysql:video:vlty&AxMwT$lmLv6bN8dkDuBYlh%N5pe@tcp(rm-2zevlk47ul0ovuci80o.mysql.rds.aliyuncs.com:3306)/xyu"
debug
=
false
# Database logger.
[database.logger]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment