Class: Sails::Config

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/sails/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config


5
6
7
# File 'lib/sails/config.rb', line 5

def initialize
  init_defaults!
end

Instance Method Details

#init_defaults!Object


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/sails/config.rb', line 9

def init_defaults!
  config.app_name = "Sails"
  config.cache_store = [:memory_store]
  config.autoload_paths = %w(app/models app/models/concerns app/workers app/services app/services/concerns lib)
  config.i18n = I18n
  config.i18n.load_path += Dir[Sails.root.join('config', 'locales', '*.{rb,yml}').to_s]
  config.i18n.default_locale = :en
  config.cache_classes = false

  config.port = 4000
  config.thread_port = 4001
  config.processor = nil
  config.thread_size = 20
  config.protocol = :binary
end