4 ms·
Here's an example web app hello-world in Fennel, parsing requests and responding with HTML rendered from the S expressions: https://gist.github.com/turbo/4388c9
by minxomat 6y ago
Here's an example web app hello-world in Fennel, parsing requests and responding with HTML rendered from the S expressions: https://gist.github.com/turbo/4388c9ad19028560053951a25b3b45d1 https://gist.github.com/turbo/4388c9ad19028560053951a25b3b45...
- yawn 6y agoThanks for posting this. I took a look at Fennel a few months ago and although they list 2 web frameworks on the front page, there's little documentation (that may have changed since then) about how to interface with other Lua projects. I kept running into things I couldn't figure out when working with the existing Lua ecosystem and projects.
- erikcw 6y agoI’ve been using it quite successfully in a large OpenResty project. While you’re right that there aren’t any docs on working with any of the 3rd party projects listed in the homepage - I found that it was pretty straight forward to use as a drop in Lua replacement by examining the compiled Lua from the online REPL. I was surprised how clean the Lua output is. There is really no magic here. I believe one of the project goals is to stay as close to Lua semantics as possible. Basically just lisp flavored Lua. In my project I just use the compiled .fnl files as I would any of other .lua file. Is something specific you’re getting stuck with? I’d be happy to try to point you in the right direction. It’s really nice! I encourage you to give it another try.