You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diary/cmd/serve.go

25 lines
515 B

3 years ago
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package cmd
import (
"git.nagee.dev/isthisnagee/diary/server"
2 years ago
"github.com/spf13/cobra"
3 years ago
)
// serveCmd represents the serve command
var serveCmd = &cobra.Command{
Use: "serve",
Short: "Run a web server at the specified port",
2 years ago
Long: `Run a web server at the specified port. Allows you to view, edit, and delete notes from a UI`,
3 years ago
Run: func(cmd *cobra.Command, args []string) {
2 years ago
server.Run(false, 37931)
3 years ago
},
}
func init() {
rootCmd.AddCommand(serveCmd)
}