The general idea is to use the ‘reloaded’ pattern, so rather than `lein run` 
you would have a function which starts and stop the system. You still need to 
run figwheel and mongo (yay for document databases) as separate processes, 
although I tend to do those in straight terminals rather than emacs shells as 
they live longer than my emacs does.

You can find more about the reloaded pattern and a prescripted approach to 
structuring your app here: https://github.com/stuartsierra/component 
<https://github.com/stuartsierra/component>.

I think it is fairly common to have:
 - your major building blocks as components
 - a specific dev namespace which is only on the :dev profile
 - fns in that namespace to start/stop components or the entire system

There are some libraries which build on the component library: 
https://github.com/danielsz/system <https://github.com/danielsz/system> for 
example.

HTH.

> On 1 Dec 2015, at 16:26, Webdev Tory Anderson <web...@toryanderson.com> wrote:
> 
> I recently read something hinting at ways of streamlining the startup process 
> for the dev environment, so I'm hoping you good folks can give me some tips. 
> I'm developing a web app in Linux, Clojurescript/Clojure (incidentally using 
> the Luminus architecture). I use emacs (that part's non-negotiable; sorry). 
> The cumbersome startup process I usually have goes like this:
> 
> M-x shell
> mongod # start the mongo daemon
> 
> M-x shell
> lein run # start the app and server
> 
> M-x shell
> lein figwheel #start CLJS development
> 
> (open a .clj file)
> C-c M-c  # (cider-connect)
> # insert localhost, port num, which proj. to connect to
> 
> 
> This is usually bearable since I only have to do it once or twice a week, but 
> it's definitely the sort of redundancy that would be nice to eliminate. The 
> "lein run" is good to have foregrounded because I can see timbre statements 
> and cleanly reboot when necessary. Figwheel, at the moment, has to be 
> foregrounded because that's where the figwheel prompt ends up (I'd love to 
> have that in Cider somehow, though). 
> 
> Any recommendations on how to chop some of these steps off?
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en 
> <http://groups.google.com/group/clojure?hl=en>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to