I'm running a haskell
-based build using cabal
the following way in dev mode on ubuntu 20.04
:
cabal new-run -- exe:live-docs \
--database-url='postgres://<user>:<password>@<host>:<port>/<dbname>' \
serve --enable-admin --admin-assets-dir=../admin/static
What is the best practice to keep the cabal session working in the background (keep-alive) for production use?
I have looked into the Cabal documentation in vain.
If the goal is to avoid
cabal
's output (as described in your comments), you have two quick options:Use
-v0
to ask it not to output anything. It will still produce output if building your program fails.Use
cabal
to build, and optionally copy it somewhere central, then just... run your program. This is what most people do. To build and run:To build and copy somewhere central: