Skip to content

Commit

Permalink
[pocketbase#1822] logged the current datetime on server start
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed Feb 12, 2023
1 parent 9fd6e7f commit 0948bf4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.12.3

- Fixed "Toggle column" reactivity when navigating between collections ([#1836](https://github.com/pocketbase/pocketbase/pull/1836)).

- Logged the current datetime on server start ([#1822](https://github.com/pocketbase/pocketbase/issues/1822)).


## v0.12.2

- Fixed the "Clear" button of the datepicker component not clearing the value ([#1730](https://github.com/pocketbase/pocketbase/discussions/1730)).
Expand Down
18 changes: 14 additions & 4 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net"
"net/http"
"path/filepath"
"strings"
"time"

"github.com/fatih/color"
Expand Down Expand Up @@ -90,11 +91,20 @@ func NewServeCommand(app core.App, showStartBanner bool) *cobra.Command {
if httpsAddr != "" {
schema = "https"
}
regular := color.New()

date := new(strings.Builder)
log.New(date, "", log.LstdFlags).Print()

bold := color.New(color.Bold).Add(color.FgGreen)
bold.Printf("> Server started at: %s\n", color.CyanString("%s://%s", schema, serverConfig.Addr))
regular.Printf(" - REST API: %s\n", color.CyanString("%s://%s/api/", schema, serverConfig.Addr))
regular.Printf(" - Admin UI: %s\n", color.CyanString("%s://%s/_/", schema, serverConfig.Addr))
bold.Printf(
"%s Server started at %s\n",
strings.TrimSpace(date.String()),
color.CyanString("%s://%s", schema, serverConfig.Addr),
)

regular := color.New()
regular.Printf(" ➜ REST API: %s\n", color.CyanString("%s://%s/api/", schema, serverConfig.Addr))
regular.Printf(" ➜ Admin UI: %s\n", color.CyanString("%s://%s/_/", schema, serverConfig.Addr))
}

var serveErr error
Expand Down

0 comments on commit 0948bf4

Please sign in to comment.