mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
write fathom version to log whenever fathom boots
This commit is contained in:
parent
3f97ad2557
commit
116cd3cd0f
@ -73,6 +73,7 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
log.Infof("%s %s", app.Name, app.Version)
|
||||
err := app.Run(os.Args)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -13,12 +13,12 @@ import (
|
||||
func register(c *cli.Context) error {
|
||||
email := c.String("email")
|
||||
if email == "" {
|
||||
return errors.New("invalid args: missing email address")
|
||||
return errors.New("Invalid arguments: missing email address")
|
||||
}
|
||||
|
||||
password := c.String("password")
|
||||
if password == "" {
|
||||
return errors.New("invalid args: missing password")
|
||||
return errors.New("Invalid arguments: missing password")
|
||||
}
|
||||
|
||||
hash, _ := bcrypt.GenerateFromPassword([]byte(password), 10)
|
||||
@ -29,9 +29,9 @@ func register(c *cli.Context) error {
|
||||
err := app.database.SaveUser(user)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating user: %s", err)
|
||||
return fmt.Errorf("Error creating user: %s", err)
|
||||
}
|
||||
|
||||
log.Infof("created user %s", user.Email)
|
||||
log.Infof("Created user %s", user.Email)
|
||||
return nil
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ func server(c *cli.Context) error {
|
||||
}
|
||||
|
||||
// start listening
|
||||
log.Printf("Fathom is now listening on %s", addr)
|
||||
log.Printf("Server is now listening on %s", addr)
|
||||
err := http.ListenAndServe(addr, h)
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user