How to run an app on localhost

Hi evreybody,

I’m trying to install legato on my linux ubuntu, and i’d like to test demo’s apps (HelloWorld) on localhost before usie target, but i don’t find commands to run it .
i tried instapp myapp localhost, it doesn’t work. the same for startapp myapp localhost.
i have tried to start legato on localhost with startlegato, but i don’t find the commande to run the app.

Would you please give me some suggestion to solve this problem?

Thank you.

Hi,

Here’s an example of how you can run the sample helloWorld app on localhost:

  1. Build legato for localhost

    make localhost

  2. Source legato environment

    bin/legs

  3. Run ‘startlegato’ script from bin directory.

    ./bin/startlegato

  4. Go to apps/sample/helloWorld and build helloWorld for localhost

    cd apps/sample/helloWorld make localhost

  5. When app is successfully built, go to _build_helloWorld/localhost/staging/bin and run binary.

    [code]
    cd _build_helloWorld/localhost/staging/bin
    ./helloWorld
    Apr 7 11:40:02 : -WRN- | serviceDirectory[30082]/framework T=main | mem.c le_mem_ForceAlloc() 679 | Memory pool ‘refFdMonitors’ overflowed. Expanded to 10 blocks.
    Apr 7 11:40:02 : INFO | helloWorld[30137]/helloWorld_exe T=main | helloWorld.c _helloWorld_exe_COMPONENT_INIT() 5 | Hello, world.

    [/code]

Also you can stop the localhost version of legato by running ‘bin/stoplegato’.

Enoch

It works ! :smiley:
Thank you ! :slight_smile:

Hi,
Im trying to do the same with Legato 18.04.0
bin is not getting created after following the mentioned steps.
cd _build_helloWorld/localhost/staging/bin
this fails
and creates
legato/apps/sample/helloWorld/_build_helloWorld/localhost/staging/read-only/lib/libComponent_helloComponent.so
Can anybody help?

Its working fine. Thanks for post

Hey Can I know versions you are using ?