-
I want to use avram with my kemal project, so, i consult a lucky project. When i check src/app.cr, i saw this: require "./shards"
# Load the asset manifest
Lucky::AssetHelpers.load_manifest "public/mix-manifest.json"
require "../config/server"
require "../config/**"
require "./app_database"
require "./models/base_model"
# ... My question is, we require AppDatabase.configure do |settings|
# ...
end
end Then, we define/open
Yes, we use a constant before define/open it, if this is intended? Why we write code like this? i found Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Here's an example of using Avram outside of a Lucky project https://github.com/jwoertink/crystal_orm_test/blob/master/src/orm_test/avram/setup.cr |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, in fact, i done it, i just expect to point out, for the generated app.cr, following is better to understood. require "./shards"
# ...
require "../config/server"
require "./app_database"
require "../config/**"
require "./models/base_model"
# ... Instead of require "./shards"
# ...
require "../config/server"
require "../config/**"
require "./app_database"
require "./models/base_model"
# ... |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks Should i create i issue point to here, or, convert this discuss to issue directly? |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks Should i create i issue point to here, or, convert this discuss to issue directly? |
Beta Was this translation helpful? Give feedback.
I've created an issue:
luckyframework/lucky_cli#768