How to read a file in PureScript (readFile)
<p>While testing, I’d like to read and write a file from and to disk (JSON in, JSON out). How do I do this in PureScript? In Haskell I have something like</p>

<pre><code>main :: IO ()
main = do
  input &lt;- readFile "input.json"
  writeFile "output.json" $ process input
</code></pre>

<p>All my attempts so far have failed, including trying to use <code>readFile</code> from <code>import Node.FS.Sync</code>.</p>

<p>BTW, if there is any other (better) way of reading in my JSON file, let me know. (I am not a JavaScript expert but I would like to port some — strict — Haskell code to JS so that it can be used elsewhere.)</p>