Gérer sa collection de jeux vidéos, consoles et figurines. Et plus si affinités.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application.cr 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. require "./initializers/**"
  2. require "amber"
  3. require "../src/controllers/application_controller"
  4. require "../src/controllers/**"
  5. # About Application.cr File
  6. #
  7. # This is Amber application main entry point. This file is responsible for loading
  8. # initializers, classes, and all application related code in order to have
  9. # Amber::Server boot up.
  10. #
  11. # > We recommend to not modify the order of the require since the order will
  12. # affect the behavior of the application.
  13. #
  14. # With `Amber::Server.configure` block you can redefine the Server configuration
  15. # settings and use ENVIRONMENT variables and/or values evaluated at runtime.
  16. #
  17. # > Important! Yaml configurations are first class citizen and are loaded first before
  18. # this file, we recommend to use yaml configurations before changing any settings here.
  19. # Any uncommented setting here will override the YAML with the value set here.
  20. Amber::Server.configure do |settings|
  21. # Use your environment variables settings here.
  22. #
  23. # Name: A name that identifies this application. This is not internally
  24. # used by the framework.
  25. #
  26. # settings.name = "Cdj Carnetdejeu web application."
  27. #
  28. #
  29. # Colorize Logging: specifies whether or not to use ANSI color codes
  30. # when logging information, display the time and/or to display the severity level.
  31. # Defaults to true.
  32. #
  33. # Log Level defines the verbosity of the Amber logger. This option defaults to
  34. # debug for all environments. The available log levels are: debug, info, warn,
  35. # error, fatal, and unknown.
  36. #
  37. # settings.logging.colorize = true
  38. # settings.logging.severity = "debug"
  39. # settings.logging.filter = %w(password confirm_password)
  40. # settings.logging.skip = %w()
  41. # settings.logging.context = %w(request headers cookies session params)
  42. #
  43. #
  44. # Secret Key Base: is used for specifying a key which allows sessions
  45. # for the application to be verified against a known secure key to
  46. # prevent tampering. Applications get Amber.secret_key
  47. # initialized to a random key present in `ENV["AMBER_SECRET_KEY"]` or
  48. # `.amber_secret_key` in this order.
  49. #
  50. # settings.secret_key_base= FEHWm3Fpm7vrPejFPM9x-3PLkj7C_fho6N-nIaBa19g
  51. #
  52. #
  53. # Host: is the application server host address or ip address. Useful for when
  54. # deploying Amber to a PAAS and likely the assigned server IP is either
  55. # known or unknown. Defaults to an environment variable HOST
  56. #
  57. # settings.host = ENV["HOST"] if ENV["HOST"]?
  58. #
  59. #
  60. # Port Reuse: Amber supports clustering mode which allows to spin
  61. # multiple app instances per core. This setting allows to bind the different
  62. # instances to the same port. Default this setting to true if the number or process
  63. # is greater than 1.
  64. #
  65. # > Read more about Linux PORT REUSE https://lwn.net/Articles/542629/
  66. #
  67. # settings.port_reuse = true
  68. #
  69. #
  70. # Process Count: This will enable Amber to be used in cluster mode,
  71. # spinning an instance for each number of process specified here.
  72. # Rule of thumb, always leave at least 1 core available for system processes/resources.
  73. #
  74. # settings.process_count = ENV["PROCESS_COUNT"].to_i if ENV["PROCESS_COUNT"]?
  75. #
  76. #
  77. # PORT: This is the port that you're application will run on. Examples would be (80, 443, 3000, 8080)
  78. #
  79. settings.port = ENV["PORT"].to_i if ENV["PORT"]?
  80. #
  81. #
  82. # Redis URL: Redis is an in memory key value storage. Amber utilizes redis as
  83. # a storing option for session information.
  84. #
  85. # settings.redis_url = ENV["REDIS_URL"] if ENV["REDIS_URL"]?
  86. #
  87. #
  88. # Database URL: This is the database connection string or data file url.
  89. # The connection string contains the information to establish a connection to the
  90. # database or the data file. Defaults to the database provider you chose at
  91. # at app generation.
  92. #
  93. # settings.database_url = ENV["DATABASE_URL"] if ENV["DATABASE_URL"]?
  94. #
  95. #
  96. # SSL Key File: The private key is a text file used initially to generate a
  97. # Certificate Signing Request (CSR), and later to secure and verify connections
  98. # using the certificate created per that request. The private key is used to create
  99. # a digital signature as you might imagine from the name, the private key should be
  100. # ``closely guarded.
  101. #
  102. # settings.ssl_key_file = ENV["SSL_KEY_FILE"] if ENV["SSL_KEY_FILE"]?
  103. #
  104. #
  105. # SSL Cert File: This represents the signed certificate file. SSL Certificates are
  106. # small data files that digitally bind a cryptographic key to an organization's
  107. # details. When installed on a web server, it activates the padlock and the https
  108. # protocol and allows secure connections from a web server to a browser.
  109. #
  110. # settings.ssl_cert_file = ENV["SSL_CERT_FILE"] if ENV["SSL_CERT_FILE"]?
  111. #
  112. #
  113. # Session: A Hash that specifies the session storage mechanism, expiration and key to be used
  114. # for the application. The `key` specifies the name of the cookie to be used defaults to
  115. # "amber.session". The store can be `encrypted_cookie`, `signed_cookie` or `redis`. Expires
  116. # when set to 0 means this is indefinitely and is expressed in seconds.
  117. #
  118. # settings.session = { "key" => "amber.session", "store" => "signed_cookie", "expires" => 0 }
  119. #
  120. #
  121. # Logger: is the logger that Amber and other capable shards in the project will use
  122. # instead of writing directly to STDOUT. Supply a custom logger to write to syslog, etc.
  123. #
  124. # settings.logger = Amber::Environment::Logger.new(File.open("carnetdejeu.log", "w"))
  125. #
  126. #
  127. end