comparison website/src/hosting.html.luan @ 1812:f44dcb3fedf7

docs - add code block
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 10 Jun 2024 14:41:48 -0600
parents c7d79ba1c476
children
comparison
equal deleted inserted replaced
1811:55d89a183c82 1812:f44dcb3fedf7
23 <h1>Luan Web Hosting</h1> 23 <h1>Luan Web Hosting</h1>
24 24
25 <p>Luan is currently mostly used for building websites. Luan <a href="https://hg.reactionary.software/repo/luan/file/tip/host">includes</a> a web hosting solution. You can install this for your own use, or you can just use our web host for free. I will explain how to use our web host.</p> 25 <p>Luan is currently mostly used for building websites. Luan <a href="https://hg.reactionary.software/repo/luan/file/tip/host">includes</a> a web hosting solution. You can install this for your own use, or you can just use our web host for free. I will explain how to use our web host.</p>
26 26
27 <p>Start by creating an empty working directory. In this working directory, create a sub-directory called <b>src</b>. This will contain the website. Now in the working directory, make shell script called <b>serve.sh</b> containing:</p> 27 <p>Start by creating an empty working directory. In this working directory, create a sub-directory called <b>src</b>. This will contain the website. Now in the working directory, make shell script called <b>serve.sh</b> containing:</p>
28 <pre> 28
29 luan luan:http/serve.luan src 29 <code block>
30 </pre> 30 luan luan:http/serve.luan src
31 </code>
31 32
32 <p>Run this script and go to <a href="http://localhost:8080/">http://localhost:8080/</a> in your browser. You should see the empty <b>src</b> directory. Now put some HTML files in <b>src</b>. You should see them in the browser. If you click on an HTML file, it should render. If you want HTML for the home page, use <b>index.html</b>. To use Luan to generate HTML, use whatever.html.luan as described the <a href="tutorial.html">Luan tutorial</a>.</p> 33 <p>Run this script and go to <a href="http://localhost:8080/">http://localhost:8080/</a> in your browser. You should see the empty <b>src</b> directory. Now put some HTML files in <b>src</b>. You should see them in the browser. If you click on an HTML file, it should render. If you want HTML for the home page, use <b>index.html</b>. To use Luan to generate HTML, use whatever.html.luan as described the <a href="tutorial.html">Luan tutorial</a>.</p>
33 34
34 <p>Suppose your domain is <b>www.whatever.com</b>. Our web host is <b>s1.luan.software</b>. So create a DNS CNAME record pointing <b>www.whatever.com</b> to <b>s1.luan.software</b>. Now make a shell script in the working directory called <b>push.sh</b> containing:</p> 35 <p>Suppose your domain is <b>www.whatever.com</b>. Our web host is <b>s1.luan.software</b>. So create a DNS CNAME record pointing <b>www.whatever.com</b> to <b>s1.luan.software</b>. Now make a shell script in the working directory called <b>push.sh</b> containing:</p>
35 <pre> 36
36 luan luan:host/push.luan www.whatever.com password src 37 <code block>
37 </pre> 38 luan luan:host/push.luan www.whatever.com password src
39 </code>
40
38 <p>Replace "password" with whatever password you want.</p> 41 <p>Replace "password" with whatever password you want.</p>
39 42
40 <p>Running this script will create your website. Running it again will update your website.</p> 43 <p>Running this script will create your website. Running it again will update your website.</p>
41 44
42 <p>If you are wondering why we offer this for free, it is because I am certain that modern scum (members of modern culture) will never use it. Modern scum hate everything that is simple and good, and love overcomplicated crap. So the free Luan hosting service will never have significant use, so I can easily offer it for free.</p> 45 <p>If you are wondering why we offer this for free, it is because I am certain that modern scum (members of modern culture) will never use it. Modern scum hate everything that is simple and good, and love overcomplicated crap. So the free Luan hosting service will never have significant use, so I can easily offer it for free.</p>