Class: ShopifyCLI::Services::App::Serve::NodeService

Inherits:
ServeService show all
Defined in:
lib/shopify_cli/services/app/serve/node_service.rb

Instance Attribute Summary

Attributes inherited from ServeService

#context, #host, #no_update, #port

Instance Method Summary collapse

Methods inherited from ServeService

#initialize

Methods inherited from BaseService

call

Constructor Details

This class inherits a constructor from ShopifyCLI::Services::App::Serve::ServeService

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
# File 'lib/shopify_cli/services/app/serve/node_service.rb', line 6

def call
  generate_url

  CLI::UI::Frame.open(context.message("core.app.serve.running_server")) do
    env = project.env.to_h
    env["PORT"] = port.to_s
    context.system("npm run dev", env: env)
  end
end