Files
postgrest/src/executable/Main.hs
T
Wolfgang Walther aa7d442d32 chore: move executable code to src/
src/ now contains all source code - in subdirectories, according to the
.cabal component they belong to. This will allow us to put vendored
libraries in the same place - and later split our own code into multiple
components/libraries as well.
2026-07-14 06:58:15 +00:00

22 lines
526 B
Haskell

module Main (main) where
import System.IO (BufferMode (..), hSetBuffering)
import qualified PostgREST.CLI as CLI
import Protolude
main :: IO ()
main = do
setBuffering
opts <- CLI.readCLIShowHelp
CLI.main opts
setBuffering :: IO ()
setBuffering = do
-- LineBuffering: the entire output buffer is flushed whenever a newline is
-- output, the buffer overflows, a hFlush is issued or the handle is closed
hSetBuffering stdout LineBuffering
hSetBuffering stdin LineBuffering
hSetBuffering stderr LineBuffering