Skip to content

Commit

Permalink
example, generate PureScript before server starts
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbecich committed Jan 28, 2024
1 parent de32d3f commit 6f5008a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion example/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ import Data.Text (pack)
import Language.PureScript.Bridge
import qualified MyLib (main)
import Types
import ArgonautTypes
import JsonHelpersTypes

main :: IO ()
main = MyLib.main
main = do
-- generate PureScript before server starts
writePSTypesWithNamespace
(Just . PackageName $ pack "Argonaut")
"src"
(buildBridge myBridge)
myArgonautTypes
writePSTypesWithNamespace
(Just . PackageName $ pack "JsonHelpers")
"src"
(buildBridge myBridge)
myJsonHelpersTypes

MyLib.main

0 comments on commit 6f5008a

Please sign in to comment.