Sha256: 7a208423560765df171904702f16461f7ea085fc9d9fbaa9f855986b1e408558

Contents?: true

Size: 312 Bytes

Versions: 10

Compression:

Stored size: 312 Bytes

Contents

module ReactOnRails
  module TestHelper
    def self.launch_node
      return unless ReactOnRails.configuration.server_render_method == "NodeJS"

      path = "#{::Rails.root}/client/node"
      puts "Launching NodeJS server at #{path}"
      system("cd #{path} && npm start &")
      sleep(1)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
react_on_rails-6.6.0.alpha.1 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.5.1 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.5.0 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.4.2 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.5.0.beta.1 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.4.1 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.4.0 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.3.5 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.3.4 lib/react_on_rails/test_helper/node_process_launcher.rb
react_on_rails-6.3.3 lib/react_on_rails/test_helper/node_process_launcher.rb