Fork me on GitHub

just made new template for using psql but i am getting db-spec mo[email protected] is missing a required parameter if i try to use function defined in queries.sql i run project by user/start


what am i missing?


and i've successfully ran migration so configs work


@lepistane it looks like the db state isn't started, if it's not referenced anywhere then running (user/start) won't start the database


mount resolves states based on the namespace hierarchy, so if you have a defstate in a namespaced that isn't referenced in the project, it's ignored


you can start it explicitly by running (mount.core/start #'<ns>/<state>)


but in most cases it's better to just reference the namespace where you'll end up using it


as far as i remember it used to be when i use (user/start) from the repl i could access functions defined in queries.sql using project.db.core :as db then db/create-user! {:something "else"} and it would work now same flow gives me errors i even checked my old project made by following ur book and it works as expected


either i am doing something wrong or there is bug with newest template i just restared my pc tried getting newest template and running migrations they got stuck

lein run migration
2018-03-17 15:02:04,982 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider 
2018-03-17 15:02:05,799 [main] INFO  twd.env - 
-=[twd started successfully using the development profile]=- 
2018-03-17 15:02:06,383 [main] INFO  luminus.http-server - starting HTTP server on port 3000 
2018-03-17 15:02:06,486 [main] DEBUG io.undertow - starting undertow server [email protected] 
2018-03-17 15:02:06,522 [main] INFO  org.xnio - XNIO version 3.3.6.Final 
2018-03-17 15:02:06,852 [main] DEBUG io.undertow - Configuring listener with protocol HTTP for interface and port 3000 
2018-03-17 15:02:06,986 [main] INFO  org.projectodd.wunderboss.web.Web - Registered web context / 
2018-03-17 15:02:06,988 [main] INFO  luminus.repl-server - starting nREPL server on port 7000 
2018-03-17 15:02:07,021 [main] INFO  twd.core - #'twd.config/env started 
2018-03-17 15:02:07,022 [main] INFO  twd.core - #'twd.handler/init-app started 
2018-03-17 15:02:07,022 [main] INFO  twd.core - #'twd.handler/app started 
2018-03-17 15:02:07,022 [main] INFO  twd.core - #'twd.core/http-server started 
2018-03-17 15:02:07,022 [main] INFO  twd.core - #'twd.core/repl-server started 
seems like db namespace isnt getting loaded


is the db namespace referenced somewhere though?


i found solution, it was referenced but there was typo in the code which made it not load btw mount is amazing!


when you have a function with a single argument, parens are optional in threading macros


@yogthos starting a big new web app for the first time in a while, and Luminus, as always, has been a godsend. I don't think I've thanked you for it in the last year, so -- thanks! It remains (IMHO) by far the best way to start a new clj/s web app.