You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not tried using a state management library, I have followed the examples and have everything working.
What I do not get is how I reference state, so say I bring up the db in start how do I then access the db connection, normally I would (defonce crux-db (run-crux)) then reference crux-db in my code, I have found clip/ref but that seems not to return an instance of the command run in startup of clip.
how would I get the connection for a db like postgres or crux ?
The only examples I could find seem to pass the connection in to all functions instead of setting it globally.
The text was updated successfully, but these errors were encountered:
it does not take a parameter, I guess ring/ring-handler could be storing a fn in app-routes which takes db.
then in this piece of code, it looks like its actually setting up the db from env and storing the instance in db rather than using clip at which point its global scope in that file and makes me wonder why its being used in clip.
I admit something in there are unfamiliar like nextjdbc, but to me the point is I use clip to start my db and http server in order and some how make the value available, I think mount for example inserts namespaces which you can import to get the reference to your instances.
Not tried using a state management library, I have followed the examples and have everything working.
What I do not get is how I reference state, so say I bring up the db in start how do I then access the db connection, normally I would (defonce crux-db (run-crux)) then reference crux-db in my code, I have found clip/ref but that seems not to return an instance of the command run in startup of clip.
how would I get the connection for a db like postgres or crux ?
The only examples I could find seem to pass the connection in to all functions instead of setting it globally.
The text was updated successfully, but these errors were encountered: