Mercurial Hosting > luan
comparison core/src/luan/modules/Hosting.luan @ 276:e5a0dd95f3e7
rename Reactionary to Hosting
git-svn-id: https://luan-java.googlecode.com/svn/trunk@277 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 20 Nov 2014 04:20:34 +0000 |
parents | core/src/luan/modules/Reactionary.luan@340656b18b74 |
children | 38bd29e59a6e |
comparison
equal
deleted
inserted
replaced
275:340656b18b74 | 276:e5a0dd95f3e7 |
---|---|
1 -- Hosting | |
2 | |
3 import "luan:Io" | |
4 | |
5 port = 9101 | |
6 socket = "socket:localhost:" .. port | |
7 | |
8 function put_site(domain,password,dir) | |
9 local pc = Io.Uri(socket).Pickle_client() | |
10 local pickle = pc.pickle | |
11 pc.call(%> | |
12 import "luan:Hosting" | |
13 Hosting.do_put_site(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) | |
14 <%) | |
15 pc.close() | |
16 end | |
17 | |
18 function delete_site(domain,password) | |
19 local pc = Io.Uri(socket).Pickle_client() | |
20 local pickle = pc.pickle | |
21 pc.call(%> | |
22 import "luan:Hosting" | |
23 Hosting.do_delete_site(<%=pickle(domain)%>,<%=pickle(password)%>) | |
24 <%) | |
25 pc.close() | |
26 end |