Mercurial Hosting > luan
comparison website/src/tutorial.html @ 1576:13135e289b50
domain change
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 28 Jan 2021 20:47:39 -0700 |
parents | d3e61cd2aca0 |
children | 7eddf1e990c0 |
comparison
equal
deleted
inserted
replaced
1575:0160650180bc | 1576:13135e289b50 |
---|---|
89 | 89 |
90 <p>The Luan webserver expects the file to return a function and calls it to generate the page. Code of the form <b>%>...<%</b> writes its output to <b>Io.stdout</b> which by default is the standard output of the command line. So in the returned function one usually starts by setting <b>Io.stdout</b> to a <code>text_writer</code> which writes its output to the HTTP response (to the web browser).</p> | 90 <p>The Luan webserver expects the file to return a function and calls it to generate the page. Code of the form <b>%>...<%</b> writes its output to <b>Io.stdout</b> which by default is the standard output of the command line. So in the returned function one usually starts by setting <b>Io.stdout</b> to a <code>text_writer</code> which writes its output to the HTTP response (to the web browser).</p> |
91 | 91 |
92 <p>You can find this example and others in the <a href="examples/">examples directory</a>. Take a look at <a href="examples/hi2.luan">hi2.luan</a> next. Remember to remove the <b>.luan</b> from the URL to run the code.</p> | 92 <p>You can find this example and others in the <a href="examples/">examples directory</a>. Take a look at <a href="examples/hi2.luan">hi2.luan</a> next. Remember to remove the <b>.luan</b> from the URL to run the code.</p> |
93 | 93 |
94 <p>So now you have built your website and you want to publish it to the web. If you have your own domain, create a CNAME record for it pointing to <b>s1.luan.ws</b>. If you don't have a domain, just use a domain like <b>bob.s1.luan.ws</b> (anything of the form <b>*.s1.luan.ws</b>). Assuming your directory is <b>site</b> and you will use the password <b>secret</b>, do the following from the command line: | 94 <p>So now you have built your website and you want to publish it to the web. If you have your own domain, create a CNAME record for it pointing to <b>s1.luan.software</b>. If you don't have a domain, just use a domain like <b>bob.s1.luan.software</b> (anything of the form <b>*.s1.luan.software</b>). Assuming your directory is <b>site</b> and you will use the password <b>secret</b>, do the following from the command line: |
95 | 95 |
96 <pre> | 96 <pre> |
97 luan luan:host/push.luan bob.s1.luan.ws secret site | 97 luan luan:host/push.luan bob.s1.luan.software secret site |
98 </pre> | 98 </pre> |
99 | 99 |
100 <p>The form is <b>luan luan:host/push.luan domain password directory</b>. If you change your site, just run this again and your site will be updated. To delete your site, do <b>luan luan:host/delete.luan domain password</b>.</p> | 100 <p>The form is <b>luan luan:host/push.luan domain password directory</b>. If you change your site, just run this again and your site will be updated. To delete your site, do <b>luan luan:host/delete.luan domain password</b>.</p> |
101 | 101 |
102 <p>Hopefully this short tutorial gave you an idea of how to use Luan to make a website.</p> | 102 <p>Hopefully this short tutorial gave you an idea of how to use Luan to make a website.</p> |