You're very close, and sorry for the errors in the docs.  The path
separator used to be `:` like on unix $PATH, but then I discovered that
won't work on windows so it was changed to `;`.

Luvi will auto-bootstrap luvit's require system and pretty-printer (`_G.p`)
if the libraries are installed in the bundle (which does happen when you
layer luvit with your app).

The biggest thing missing is using luvit's main wrapper.  See an example at
https://github.com/luvit/luvit/blob/master/examples/custom-binary/main.lua

If your main only contains a luvit app it will never call `uv.run()` and
start the blocking event loop.  This and some other setup steps are
contained in the main wrapper in the luvit module.

If you layer luvit instead of loading it with lit, the path will be
"bundle:init.lua" instead of "luvit".  Why can't you use lit?

On Mon, Mar 16, 2015 at 4:46 AM, Jörg Krause <[email protected]>
wrote:

> Hi luvit folks,
>
> first, many thanks for this nice framework! I'm using node on an embedded
> device, but V8 dropped support for the ARMv5 architecture, so the node 0.12
> is not useable for me. Besides, the binary size growth also makes me
> unhappy. That's why, I'm trying to switch to luvit.
>
> As I said, I want to use luvit on an headless embedded Linux device with
> an ARMv5 architecture. I managed to cross-compile both luv and luvi. Since
> I cannot and do not want to use lit on my device, I need to start an luvit
> app with luvi.
>
> Getting started I started with a copy of the http-server example from the
> luvit source tree. This is my project directory tree:
> /
> └── app
> │   └── main.lua (*copy&pasted from luvit/example/http-server.lua*)
> └──luvit (*cloned from git*)
>
> First, the usage help text both of github and luvi binary are wrong for
> Linux. Github says use a colon:
>
> LUVI_APP=myapp:luvit/app (no quotes, use colon), the luvi usage says 
> "LUVI_APP=myapp;luvit/app" (wrong placed quotes, use semicolon)
>
>
> Correct for Linux is: LUVI_APP="myapp;luvit/app"
>
> With this, I'm able to start the app:
> $ LUVI_APP="app;luvit" luvi
> Server listening at http://localhost:8080/
> Server listening at https://localhost:8443/
> $ <-- exit to the console
>
> The problem here is that luvi exits immediately and returns to the console.
>
> If I run the http-server example with luvit, it does not exit:
>
> $ ./luvit examples/http-server.lua
> Server listening at http://localhost:8080/
> Server listening at https://localhost:8443/
>  <-- cursor is blinking here.
>
> So, with luvit the app is running forever (at least until it is killed
> with CTRL+C) with luvi it does not.
>
> Did I missed something?
>
> --
> You received this message because you are subscribed to the Google Groups
> "luvit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to