Advertisement
Guest User

Database/Webserver commands

a guest
Apr 19th, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. databaseCmd = &cobra.Command{
  2. Use: "database",
  3. Run: func(cmd *cobra.Command, args []string) {
  4. ctx := context.Background()
  5. err := database.Run(ctx, databaseRPCAddr)
  6. if err != nil {
  7. panic(err)
  8. }
  9. },
  10. }
  11.  
  12. webserverCmd = &cobra.Command{
  13. Use: "webserver",
  14. Run: func(cmd *cobra.Command, args []string) {
  15. ctx := context.Background()
  16. fmt.Println("running")
  17.  
  18. err := webserver.Run(ctx, localhost:8080, databaseRPCAddr, "./web", cache)
  19. if err != nil {
  20. panic(err)
  21. }
  22. },
  23. }
  24. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement