code: func localConsole(ctx *cli.Context) error {
  	// Create and start the node based on the CLI flags
  	node := makeFullNode(ctx)
  	startNode(ctx, node)
  	defer node.Close()
  
  	// Attach to the newly started node and start the JavaScript console
  	client, err := node.Attach()
  	if err != nil {
  		utils.Fatalf("Failed to attach to the inproc geth: %v", err)
  	}
  	config := console.Config{
  		DataDir: utils.MakeDataDir(ctx),
  		DocRoot: ctx.GlobalString(utils.JSpathFlag.Name),
  		Client:  client,
  		Preload: utils.MakeConsolePreloads(ctx),
  	}
  
  	console, err := console.New(config)
  	if err != nil {
  		utils.Fatalf("Failed to start the JavaScript console: %v", err)
  	}
  	defer console.Stop(false)
  
  	// If only a short execution was requested, evaluate and return
  	if script := ctx.GlobalString(utils.ExecFlag.Name); script != "" {
  		console.Evaluate(script)
  		return nil
  	}
  	// Otherwise print the welcome screen and enter interactive mode
  	console.Welcome()
  	console.Interactive()
  
  	return nil
  }
docs: // localConsole starts a new geth node, attaching a JavaScript console to it at the
  // same time.