2024-05-22 10:42:00 +02:00
|
|
|
/*
|
2024-05-23 10:42:39 +02:00
|
|
|
Copyright © 2024 raul <raul@bulgariu.xyz>
|
2024-05-22 10:42:00 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var serverCmd = &cobra.Command{
|
|
|
|
Use: "server",
|
2024-05-22 15:36:33 +02:00
|
|
|
Short: "Start cert400 web server",
|
|
|
|
Long: `Start cert400 web server`,
|
2024-05-22 10:42:00 +02:00
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
server()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(serverCmd)
|
2024-05-23 13:49:06 +02:00
|
|
|
// TODO: Allow choosing CA certificates by parameter
|
|
|
|
// serverCmd.Flags().StringP("cert", "c", "$HOME/.config/cert400/server.crt", "CA certificate")
|
|
|
|
// serverCmd.Flags().StringP("key", "k", "$HOME/.config/cert400/server.key", "CA private key")
|
2024-05-22 10:42:00 +02:00
|
|
|
}
|