As far as I know to make new projects yosog
and yosog2
I do the following
$ yesod init
$ cd yosog
yosog$ cabal sandbox init
yosog$ cabal install
$ yesod init
$ cd yosog2
yosog2$ cabal sandbox init
yosog2$ cabal install
But each cabal install
takes forever. How am I suppose to make a bunch of Yesod projects if each takes forever to compile?
It sounds like what you're really trying to do is have multiple separate projects reuse the same cabal sandbox. You can do this by specifying a shared --sandbox
option to the cabal sandbox
command. Note, however, that by sharing a sandbox, you're giving up on some of the protection that sandboxes are intended to provide.
It is kind of unusual to run multiple projects Yesod at the same time. Each would need their own tcp port, and run a completely separate server. Two Yesod projects would usually indicate completely different websites that have nothing to do with each other.
You can put multiple handlers and routes in one single project, so if you have related web pages/APIs you would install them with a single command. If you have pieces that are truly modular and reusable, you could put those handlers in library packages, but the main project will still build and install under a single Yesod program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With