r/purescript • u/DeepDay6 • Aug 01 '22
[how to] Generate server-side HTML
I'm about to learn PureScript, coming from a functional TypeScript, Clojure and Elm background. To get a first taste for the language I thought I'd rewrite my Clojure test-app which generates static HTML files from JSON input using the hiccup templating library.
Is there some similar library in PureScript which would provide functions to create an HTML document and its content? Something similar to Haskell's blaze? I could not find anything when searching pursuit, but I might be just be using the wrong search terms.
3
Upvotes
View all comments
Show parent comment
1
u/DeepDay6 Aug 01 '22 edited Aug 01 '22
Thanks... maybe server side rendering is not an appropriate description for what I'm trying to achieve. Basically I want just what I said above: generate some HTML and then IO it to console/file.I found Smolder which seems to do that in a simple way and also has a built in string renderer. The usage of
doseems a little strange, though.