leafo / lapis

A web framework for Lua and OpenResty written in MoonScript
http://leafo.net/lapis/
MIT License
3.14k stars 247 forks source link

run files with `lapis exec` #528

Open DarkWiiPlayer opened 7 years ago

DarkWiiPlayer commented 7 years ago

It would be nice if there was a prettier way to do this than lapis exec 'loadfile"filename"()'

leafo commented 7 years ago

is there a reason you need to use exec? Most of lapis can also run on the command line without openresty?

Also you can use require to load and execute a file right away, just leave off the .lua

DarkWiiPlayer commented 7 years ago

pretty much just for aesthetics; a script that runs a file of code inside the server looks prettier if you can write "lapis execfile \" or something like that, specially if you have to change it after not looking at it for two years.