Hi! i'm starting to play around with Roc and was trying to build a todo web server in the basic-webserver platform.
I did not want to mess with sqlite or anything a simple dict holding my TODOs would be enough.
Is there a way to do this in roc? i suspect the platform should give me some way to create mutable state which is done through a state monad in most purely functional programmig languages.
How would one do this in Roc?
Hi @Agustin Romero,
Is there a way to do this in roc?
This is possible but I recommend going with the sqlite version for now, modifying the platform will likely be more complicated if you've never done that before.
Hi Anton thanks for the quick reply,
so i was correct there is literally no way to do that right now
Correct. Each http request is basically completely isolated from other requests and run on different threads.
hey luke feeling quite dumb here... copied the sqlite example from the platform and replaced the platform import...
Getting a file not found error. Any clues?
sorry... looking at the future docs :P
Last updated: Jul 06 2025 at 12:14 UTC