# Hello! I've built a web app using Genie + Stipple and I would like to deploy it to

**URL:** <https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459>\
**Category:** General Usage\
**Created:** [February 2, 2021, 1:55pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459 "2021-02-02T13:55:22Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![BridgeBot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bridgebot/32/21491_2.png) [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Post date:** [February 2, 2021, 1:55pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/1 "2021-02-02T13:55:23Z")

</div>

Hello! I’ve built a web app using Genie + Stipple and I would like to deploy it to my website (i.e. with a julia process running in the background). Has anyone done this before?

Note that the original poster on Slack cannot see your response here on Discourse. Consider _transcribing the appropriate answer back to Slack_, or pinging the poster here on Discourse so they can _follow this thread_.  
[(Original message :slack:)](https://julialang.slack.com/archives/C6A044SQH/p1612267482381400?thread_ts=1612267482.381400&cid=C6A044SQH) [(More Info)](https://github.com/JuliaCommunity/SlackBridge)

---

<div class="post-metadata">

**Author:** ![viralbshah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/viralbshah/32/54_2.png) [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Post date:** [February 3, 2021, 2:34pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/2 "2021-02-03T14:34:33Z")

</div>

Perhaps @essenciary can chime in.

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 4, 2021, 9:12am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/3 "2021-02-04T09:12:28Z")

</div>

I imagine he has more important things to do 😃 and I have a feeling that anyone with a slightly better grasp of web servers than mine would be able to point me in the right direction.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 4, 2021, 9:33am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/4 "2021-02-04T09:33:39Z")

</div>

> [@BridgeBot](#):
>
> my website

blind leading the blind here, but, currently, what is “your” website?

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 4, 2021, 9:50am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/5 "2021-02-04T09:50:42Z")

</div>

I have [grav](https://getgrav.org/) setup with nginx and letsencrypt, so it’s accessible via ports 80 and 443 (I have only a tenuous grasp of what that means btw). The main thing I was wondering was how to convert:

```julia
route("/", ui)
up(8000, open_browser=true)

```

To what you should do on a web server. Do I replace it with `up(443)` ? How do I “link” the app within my website?

EDIT: linked to the wrong grav website.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [February 4, 2021, 9:54am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/6 "2021-02-04T09:54:03Z")

</div>

Hi Sebastian - happy to help. Depending on your hosting, two of the most common options are:

- docker deployments which work for most cloud providers - `Genie.Deploy` helps with dockerizing Genie apps and comes with Heroku integration. Please check out the docs for using Genie with Docker (and Heroku, if that’s your host).  
[Using Genie with Docker · Genie - The Highly Productive Julia Web Framework](https://genieframework.github.io/Genie.jl/dev/tutorials/16--Using_Genie_With_Docker.html)  
[Deploying to Heroku with Buildpacks · Genie - The Highly Productive Julia Web Framework](https://genieframework.github.io/Genie.jl/dev/tutorials/90--Deploying_With_Heroku_Buildpacks.html)

For Heroku deployments there is also `Genie.Deploy.Heroku` which uses the Heroku CLI to make deployments very easy but there is no tutorial yet.

- manually by using Nginx as a proxy  
[Deploying to server with Nginx · Genie - The Highly Productive Julia Web Framework](https://genieframework.github.io/Genie.jl/dev/tutorials/92--Deploying_Genie_Server_Apps_with_Nginx.html)

I’m also successfully using Apache as a proxy instead of Nginx but I didn’t have the time to write a doc about it yet. But if you plan to use Apache let me know and I can pass you the Apache config.

Ping me if you need help.

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 4, 2021, 10:22am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/7 "2021-02-04T10:22:20Z")

</div>

Thanks for the link to the documentation, I should have checked that out first.

It seems that the nginx route assumes that the only thing running on your server would be the Genie app (or at least I wouldn’t know how to modify the nginx config to also have it serve up my grav website).

Would it be easier to do this if I used a docker container as suggested in the docs? And if I did, how would I integrate this into my website, i.e. have a page which says “Click here to checkout my app” and then it takes you to a page on my website were you can interact with the app. (FYI I host my website on a Hetzner server).

If this is more difficult than I expect then I’m fine with that, and I’ll just e.g. set this app standalone on Heroku and link that from my website.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [February 4, 2021, 10:48am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/8 "2021-02-04T10:48:16Z")

</div>

It shouldn’t be that hard to set up.

Are you using Apache now on the server?

Basically the steps are:  
1 - set up the Julia/Genie app to run on port 8000 (or whatever non-root non-public port)  
2 - create a virtual host (how you do this is different for Apache or Nginx but there are tons of tutorials) to forward traffic from port 80 (where Apache or Nginx is setup) to port 8000

If you want to run multiple websites on the same server (as it usually is the case) you need to assign different domains or subdomains to the hosts, so Apache/Nginx will know how to handle the traffic by domain.

If you’re on Apache, I can forward you a config that we’re using at work.

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 4, 2021, 11:17am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/9 "2021-02-04T11:17:44Z")

</div>

I’m on Nginx, so I’ll do some googling about setting up a virtual host and get back to you (that might be a while though, I’m just messing around with this in my spare time).

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 4, 2021, 2:42pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/10 "2021-02-04T14:42:26Z")

</div>

Looking forward to some blog/post showcasing this process. It should prove really useful! Awesome stuff @essenciary !!!

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [February 4, 2021, 2:42pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/11 "2021-02-04T14:42:55Z")

</div>

Key word is “reverse proxy”

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 4, 2021, 2:52pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/12 "2021-02-04T14:52:13Z")

</div>

_ **Shudder** _ I know that word from the days when I was trying to setup my home unRAID server. Let’s see if I understand what that’s all about this time round.

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 6, 2021, 2:07pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/13 "2021-02-06T14:07:17Z")

</div>

Ok, so the basic steps I followed are:

1. Cloned my repository (see [here](https://github.com/junglegobs/CountdownSolver.jl)) on my server
2. Started Julia and ran `src/build_web_app.jl` which produced the following output:

```julia
Web Server running at http://127.0.0.1:8000

```

1. Created a new file at `/etc/nginx/conf.d/reverse-proxies.config` which looks like this:

```julia
server {
        listen 80;
        server_name countdown.gobs.brussels;
        location / {
                proxy_pass http://<server_ip_address>:8000; # I had tried replacing the ip address 
        }
}

```

1. Restarted nginx: `sudo systemctl restart nginx`.

As I understand, I should be able to go to `countdown.gobs.brussels` and see my app, but this is not the case. I’ll have another stab at it at some point, but just thought I’d give an update. FYI I was following [this tutorial](http://ryan.himmelwright.net/post/nginx-subdomain-reverse-proxy/) for reverse proxies

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 21, 2021, 1:19pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/14 "2021-02-21T13:19:20Z")

</div>

I had made a silly mistake, now my web app is available at `countdown.gobs.eu`. It doesn’t work however - clicking solve should produce the output `1000//1 obtained by: (2 + 3) * (4 * 50)`, but nothing happens. @essenciary what can I do to troubleshoot? The web app works when I run it on my local machine.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [February 22, 2021, 8:20am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/15 "2021-02-22T08:20:54Z")

</div>

There seems to be an issue with the `WebSockets` connection on the server. Can you look into that?

PS - I will tag new `Genie` and `Stipple` releases which also work exclusively over `HTTP` (so no need for `WebSockets`), you’ll be able to use that if `WS` is not available on the server (I think by end of today).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/6/b628acf95f8b0234d6f94256c38cbb8b529cef22.png)

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 22, 2021, 8:39am UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/16 "2021-02-22T08:39:51Z")

</div>

Thanks for getting back to me! I must admit I’m not familiar with `WebSockets`, so I’ll just wait for those releases and see if that fixes this.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [February 22, 2021, 12:01pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/17 "2021-02-22T12:01:35Z")

</div>

Check this:

> **[GitHub - GenieFramework/Stipple.jl: The reactive UI library for interactive...](https://github.com/GenieFramework/Stipple.jl#choosing-the-transport-layer-websockets-or-http)**
>
> The reactive UI library for interactive data applications with pure Julia. - GitHub - GenieFramework/Stipple.jl: The reactive UI library for interactive data applications with pure Julia.

---

<div class="post-metadata">

**Author:** ![gobs](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@gobs](https://discourse.julialang.org/u/gobs)\
**Post date:** [February 22, 2021, 6:16pm UTC](https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/18 "2021-02-22T18:16:01Z")

</div>

IT WORKS! Thanks so much @essenciary . As you can see, the use case is pretty trivial, but now I’ll be ready for when I want to do something actually useful in the future.

I wrote up a short blog post about it [here](https://gobs.eu/gobs-life/countdown-solver) for anyone whose interested.
