# How to run an app on localhost

**URL:** <https://forum.legato.io/t/how-to-run-an-app-on-localhost/118>\
**Category:** Legato Application Framework\
**Created:** [April 1, 2015, 9:16am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118 "2015-04-01T09:16:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbarazz](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mbarazz](https://forum.legato.io/u/mbarazz)\
**Post date:** [April 1, 2015, 9:16am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/1 "2015-04-01T09:16:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![esun](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@esun](https://forum.legato.io/u/esun)\
**Post date:** [April 7, 2015, 6:47pm UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/2 "2015-04-07T18:47:30Z")

</div>

Hi,

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

1. Build legato for localhost

2. Source legato environment

3. Run ‘startlegato’ script from bin directory.

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

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

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

Enoch

---

<div class="post-metadata">

**Author:** ![mbarazz](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mbarazz](https://forum.legato.io/u/mbarazz)\
**Post date:** [April 8, 2015, 7:46am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/3 "2015-04-08T07:46:23Z")

</div>

It works ! 😃  
Thank you ! 🙂

---

<div class="post-metadata">

**Author:** ![m.opoka](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@m.opoka](https://forum.legato.io/u/m.opoka)\
**Post date:** [July 13, 2019, 8:49am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/4 "2019-07-13T08:49:26Z")

</div>

I was looking for a solution to that too and I’m glad I found this topic. It worked for me in case of ‘hello world’.  
However when I define timer inside it does not work.  
I can compile HelloIpc - but it does not work too.

Do you have any suggestions to solve that?

Miroslaw

---

<div class="post-metadata">

**Author:** ![nvd](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@nvd](https://forum.legato.io/u/nvd)\
**Post date:** [July 18, 2019, 12:56am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/5 "2019-07-18T00:56:45Z")

</div>

Thanks for sharing @esun. Do you folks generally use this for unit testing?

---

<div class="post-metadata">

**Author:** ![makelinux](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/makelinux/32/557_2.png) [@makelinux](https://forum.legato.io/u/makelinux)\
**Post date:** [November 9, 2020, 8:11am UTC](https://forum.legato.io/t/how-to-run-an-app-on-localhost/118/6 "2020-11-09T08:11:19Z")

</div>

I join to the question.  
How please to run more complex applications with services on the localhost mode?
