From 40abca541e331c213a5cc94c676d58b3ca84b7ad Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 8 Sep 2025 15:07:22 +0600 Subject: add native support for fennel --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 58ed14c..c28bf6b 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,17 @@ luna [options] LUAFILE Number of HTTP-workers to start (default $(nproc)) ``` -LUAFILE must point to a Lua file that may or may not register routes to handle -(via calling `luna.route.static` or `luna.route.route`). Whatever the LUAFILE -returns is ignored. If LUAFILE defines no routes luna will execute the file and -then exit. This behavior is useful when you want to have a script file with an -access to the luna API. +LUAFILE must point to a Lua (or Fennel) file that may or may not register +routes to handle (via calling `luna.route.static` or `luna.route.route`). +Whatever the LUAFILE returns is ignored. If LUAFILE defines no routes luna will +execute the file and then exit. This behavior is useful when you want to have a +script file with an access to the luna API. + +> luna has built-in fennel support and as such you may provide any .fnl file +> as the LUAFILE. luna takes care of setting everything up properly for that +> so you do not need to configure traceback function, run "fennel.install" +> and etc. In this scenario fennel library is globally accessible +> via `fennel` variable. If luna is started with -D flag it will accept user input into its stdio. The input is executed in Lua state as is or (if `luna.onEval` was called in -- cgit v1.2.3