module App

Defined in:

constants.cr

Constant Summary

BUILD_COMMIT = {{ (env("PLACE_COMMIT")) || "DEV" }}
BUILD_TIME = {{ (system("date -u")).stringify }}
COOKIE_SESSION_KEY = ENV["COOKIE_SESSION_KEY"]? || "_staff_api_"
COOKIE_SESSION_SECRET = ENV["COOKIE_SESSION_SECRET"]? || "4f74c0b358d5bab4000dd3c75465dc2c"
DEFAULT_HOST = ENV["SG_SERVER_HOST"]? || "127.0.0.1"
DEFAULT_PORT = (ENV["SG_SERVER_PORT"]? || 3000).to_i
DEFAULT_PROCESS_COUNT = (ENV["SG_PROCESS_COUNT"]? || 1).to_i
ENVIRONMENT = ENV["SG_ENV"]? || "development"
Log = ::Log.for(NAME)
LOG_BACKEND = ActionController.default_backend
NAME = "StaffAPI"
PG_CONNECTION_POOL_SIZE = ENV["PG_CONNECTION_POOL_SIZE"]?.presence.try(&.to_i?) || 5
PG_DATABASE_URL = TEST ? ENV["PG_TEST_DATABASE_URL"] : ENV["PG_DATABASE_URL"]
PLACE_URI = ENV["PLACE_URI"]?.presence || (abort("PLACE_URI not in environment"))
PRODUCTION = ENVIRONMENT == "production"
SSL_VERIFY_NONE = !(!ENV["SSL_VERIFY_NONE"]?.presence.try do |var| var.downcase.in?("1", "true") end)
TEST = ENVIRONMENT == "test"
VERSION = {{ (`shards version \"/srv/crystaldoc.info/github-PlaceOS-staff-api-v1.1.2/src\"`).chomp.stringify.downcase }}

Class Method Summary

Class Method Detail

def self.running_in_production? : Bool #

[View source]