-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathreact_on_rails_pro.rb
More file actions
24 lines (21 loc) · 1.23 KB
/
react_on_rails_pro.rb
File metadata and controls
24 lines (21 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true
# See https://reactonrails.com/docs/configuration/configuration-pro
# Production license: set REACT_ON_RAILS_PRO_LICENSE to the JWT token from
# https://pro.reactonrails.com/. Development and test environments don't
# require a license — the Pro engine logs an info-level notice only.
ReactOnRailsPro.configure do |config|
# Route all server rendering through the Pro Node renderer (port 3800).
# Falling back to ExecJS is disabled so any renderer issue surfaces loudly
# instead of silently degrading.
config.server_renderer = "NodeRenderer"
config.renderer_use_fallback_exec_js = false
# Renderer HTTP endpoint. The Node renderer listens on localhost:3800 in
# development; override REACT_RENDERER_URL in production to point at the
# deployed renderer host.
config.renderer_url = ENV.fetch("REACT_RENDERER_URL", "http://localhost:3800")
# Shared secret for renderer authentication. Must match renderer/node-renderer.js.
# In production, set RENDERER_PASSWORD to a strong value via your secret store.
# The shared dev default keeps the launcher and initializer in sync locally
# so `bin/dev` just works.
config.renderer_password = ENV.fetch("RENDERER_PASSWORD", "local-dev-renderer-password")
end