Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just figured out how to do this yesterday, here's the source of my barebones Scott/Persistent/Esqueleto app. All it does is insert some records into the db (sqlite), then runs a server that displays the first entry. (The entry is mixed into the scotty tutorial because I stopped as soon as I got something working). https://github.com/cgag/comments

I may write up a blogpost on getting this far. It's mostly based on this: https://www.fpcomplete.com/school/starting-with-haskell/libr... . I didn't do much beyond figure out explictly using L.fromStrict to deal with conflicting interpretations of overloaded-strings and figuring out how where to put my fillDB and getComments functions in main. I initially tried to call these within the scotty monad, but I think doing it that way would have required learning about monad transformers.

I'm hoping to eventually turn this into a simple disqus alternative that should be lightweight and easy to distribute as a binary.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: