scribe/config/route_helper.cr
Edward Loveall c775072b3d
Add instructions for Lucky config variables
The most common is "How do I set my custom domain" (answer: APP_DOMAIN)
but this also requires setting LUCKY_ENV=production which requires
SECRET_KEY_BASE, DATABASE_URL, and PORT
2022-01-15 16:29:46 -05:00

7 lines
207 B
Crystal

Lucky::RouteHelper.configure do |settings|
if LuckyEnv.production?
settings.base_uri = ENV.fetch("APP_DOMAIN")
else
settings.base_uri = "http://localhost:#{Lucky::ServerSettings.port}"
end
end