Mercurial Hosting > luan
comparison core/src/luan/modules/host/Hosting.luan @ 348:6fd016d35ec1 0.2
improve Hosting and fix mmake
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 12 Apr 2015 08:35:23 -0600 |
parents | core/src/luan/modules/Hosting.luan@7f7708e8fdd4 |
children | e9e445e28f0b |
comparison
equal
deleted
inserted
replaced
347:612a283b3d14 | 348:6fd016d35ec1 |
---|---|
1 -- Hosting | |
2 | |
3 local Io = require "luan:Io" | |
4 | |
5 port = 9101 | |
6 | |
7 function push(domain,password,dir) | |
8 local socket = "socket:" .. domain .. ":" .. port | |
9 local pc = Io.Uri(socket).Pickle_client() | |
10 local pickle = pc.pickle | |
11 pc.call(%> | |
12 local Hosting = require "luan:host/Hosting" | |
13 Hosting.do_push(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) | |
14 <%) | |
15 pc.close() | |
16 end | |
17 | |
18 function delete(domain,password) | |
19 local socket = "socket:" .. domain .. ":" .. port | |
20 local pc = Io.Uri(socket).Pickle_client() | |
21 local pickle = pc.pickle | |
22 pc.call(%> | |
23 local Hosting = require "luan:host/Hosting" | |
24 Hosting.do_delete(<%=pickle(domain)%>,<%=pickle(password)%>) | |
25 <%) | |
26 pc.close() | |
27 end |