mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-29 11:44:53 +01:00
52a4fbc96b
As requested in #176 and #147 * Add initail version of a web UI for querying history from the browser * Rename webui command * Add basic test for the web UI * Add README for the web UI * Add basic auth for the web server * Add status code when panic-ing
24 lines
497 B
Go
24 lines
497 B
Go
package cmd
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/ddworken/hishtory/client/hctx"
|
|
"github.com/ddworken/hishtory/client/lib"
|
|
"github.com/ddworken/hishtory/client/webui"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var webUiCmd = &cobra.Command{
|
|
Use: "start-web-ui",
|
|
Short: "Serve a basic web UI for interacting with your shell history",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
lib.CheckFatalError(webui.StartWebUiServer(hctx.MakeContext()))
|
|
os.Exit(1)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(webUiCmd)
|
|
}
|