mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-06 04:54:59 +08:00
* add missing flag to deprecated serve command * docs references to initial account * modify shiori serve references * update dependencies * remove serve from shiori -h docs output * remove migrated routes * fix faq heading levels * downgrade go-epub to 1.2.0
25 lines
818 B
Go
25 lines
818 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func serveCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "serve",
|
|
Short: "Serve web interface for managing bookmarks",
|
|
Long: "Run a simple and performant web server which " +
|
|
"serves the site for managing bookmarks. If --port " +
|
|
"flag is not used, it will use port 8080 by default.",
|
|
Deprecated: "use server instead",
|
|
Run: newServerCommandHandler(),
|
|
}
|
|
|
|
cmd.Flags().IntP("port", "p", 8080, "Port used by the server")
|
|
cmd.Flags().StringP("address", "a", "", "Address the server listens to")
|
|
cmd.Flags().StringP("webroot", "r", "/", "Root path that used by server")
|
|
cmd.Flags().Bool("log", true, "Print out a non-standard access log")
|
|
cmd.Flags().Bool("serve-web-ui", true, "Serve static files from the webroot path")
|
|
|
|
return cmd
|
|
}
|