lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>If you also want to have a standalone
>version of this module, just use a main
>file where you require this module and 
>execute the needed code. 

It’s a “standalone module” (e.g. run a basic TCP server configured directly from the command line) that I am after.

If you need a main file that exists only to do something like...

 require(’tcpserver’).run(require(’args’).parse())

 ...then tcpserver.lua is not acting as a tandalone module, it’s just a regular module module.

It would be nice to be able to say something like...

lua tcpserver.lua -hexdump 127.0.0.1:8000

...in the case that no special tweaking of the tcpserver functionality is required.