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