Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
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
Vũ Hoàng Anh
canifa_note
Commits
7b8a8254
Commit
7b8a8254
authored
May 20, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: add greeting banner
parent
3fdc5bb2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
root.go
bin/server/cmd/root.go
+16
-3
server.go
server/server.go
+1
-1
No files found.
bin/server/cmd/root.go
View file @
7b8a8254
...
...
@@ -9,6 +9,17 @@ import (
"memos/store"
)
const
(
greetingBanner
=
`
███╗ ███╗███████╗███╗ ███╗ ██████╗ ███████╗
████╗ ████║██╔════╝████╗ ████║██╔═══██╗██╔════╝
██╔████╔██║█████╗ ██╔████╔██║██║ ██║███████╗
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║██║ ██║╚════██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝███████║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
`
)
type
Main
struct
{
profile
*
common
.
Profile
}
...
...
@@ -37,9 +48,11 @@ func Execute() {
profile
:
profile
,
}
err
:=
m
.
Run
()
if
err
!=
nil
{
fmt
.
Printf
(
"%+v
\n
"
,
err
)
println
(
greetingBanner
)
fmt
.
Printf
(
"Version %s has started at :%d
\n
"
,
profile
.
Version
,
profile
.
Port
)
if
err
:=
m
.
Run
();
err
!=
nil
{
fmt
.
Printf
(
"error: %+v
\n
"
,
err
)
os
.
Exit
(
1
)
}
}
server/server.go
View file @
7b8a8254
...
...
@@ -25,7 +25,7 @@ func NewServer(profile *common.Profile) *Server {
e
:=
echo
.
New
()
e
.
Debug
=
true
e
.
HideBanner
=
true
e
.
HidePort
=
fals
e
e
.
HidePort
=
tru
e
e
.
Use
(
middleware
.
LoggerWithConfig
(
middleware
.
LoggerConfig
{
Format
:
"${method} ${uri} ${status}
\n
"
,
...
...
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