[HN Gopher] Set up a website with Nim (2019)
       ___________________________________________________________________
        
       Set up a website with Nim (2019)
        
       Author : melissalobos
       Score  : 69 points
       Date   : 2022-01-30 16:01 UTC (7 hours ago)
        
 (HTM) web link (ttj.dk)
 (TXT) w3m dump (ttj.dk)
        
       | smazga wrote:
       | Personally, I find this kind of tutorial very helpful. Minimal
       | prose, straightforward code, and lots of comments.
        
       | ThomasTJdev wrote:
       | [Author here] This post was quite a surprise to see here! Guess
       | who got busy checking out his old repository ;) . This is a blog
       | post from 2019 during my Nim journey, which has now resulted in
       | our entire SaaS[0] running Nim. Nim[1] has evolved a lot since
       | the post - current stable 1.6.4, blog post was for 0.19.2.
       | 
       | [0] https://cxplanner.com [1] https://nim-lang.org
        
         | oceankid wrote:
         | Came here to say I love how focused your product feels.
         | 
         | If you're using Nim to target JS, a demo link of the Gantt
         | would be super nice.
         | 
         | ps: A minor image 404 on the feature page there.
        
         | melissalobos wrote:
         | Thanks for writing this! Is there anything major people should
         | look out for with the newer language version or any advice you
         | would offer to something looking into writing a webpage in Nim
         | today?
         | 
         | I am working on a small side project in Nim and saw your post
         | and thought it was very well done.
        
           | ThomasTJdev wrote:
           | I'm glad you liked it! We have been using Nim from 0.18.x to
           | now (1.6.x) with a minimal work with breaking changes - so no
           | warning signals from here.
           | 
           | My advice would be to use the current stable version since
           | 2.0.0 is just around the corner :) ! We are quite happy with
           | the performance and system load using jester[1] with
           | httpbeast for routing, but there are a couple of alternatives
           | in the package repository[2].
           | 
           | [0] https://nim-lang.org/install_unix.html [1]
           | https://github.com/dom96/jester/ [2]
           | https://nimble.directory/
        
             | dom96 wrote:
             | Really awesome to see Jester/HttpBeast being used in the
             | wild! CxPlanner looks really cool, nice job :)
        
         | mysterydip wrote:
         | I just started using Nim this weekend, so this is some nice
         | serindipity :) Do you have more recommendations for someone who
         | has programmed for years but new to Nim to get up to speed?
         | Specifically I'm looking for using it to do hosting and
         | websockets, but anything would be helpful.
        
           | ThomasTJdev wrote:
           | I don't know about other web-guides. Nim's official website
           | is made with Nim and available at Github[0], but it has
           | become at bit more complicated after they switched to
           | Karax[1]. Jester's tests gives a good view on the routing
           | procedures[2].
           | 
           | The official tutorials[3] are pretty good, when you get the
           | grab on how to "decode" them. For web development with
           | websockets and microservices I would suggest you to have a
           | look at the Redis package[4], and @treeform's Websocket[5]
           | and JsonParsing-packet[6].
           | 
           | [0] https://github.com/nim-lang/nimforum/ [1]
           | https://github.com/karaxnim/karax [2] https://github.com/dom9
           | 6/jester/blob/master/tests/alltest.ni... [3] https://nim-
           | lang.org/docs/tut1.html [4] https://github.com/nim-lang/redis
           | [5] https://github.com/treeform/ws [6]
           | https://github.com/treeform/jsony
        
       | planetis wrote:
       | Builtin templates in Nim are awesome but since then, there is the
       | possibility to render pages server-side with karax:
       | https://github.com/karaxnim/karax Check my project that converts
       | a static web page to ready to use karax DSL code:
       | 
       | https://github.com/nim-lang-cn/html2karax
        
       | [deleted]
        
       | sergiotapia wrote:
       | If you want to try an alternative to Jester, Prologue is very
       | nice to use: https://github.com/planety/prologue
        
       | s5806533 wrote:
       | Interesting. For the sake of completeness, it's worth mentioning
       | that this tutorial is from 2019.
        
       ___________________________________________________________________
       (page generated 2022-01-30 23:01 UTC)