Mercurial Hosting > luan
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/src/luan/modules/host/Hosting.luan Sun Apr 12 08:35:23 2015 -0600 @@ -0,0 +1,27 @@ +-- Hosting + +local Io = require "luan:Io" + +port = 9101 + +function push(domain,password,dir) + local socket = "socket:" .. domain .. ":" .. port + local pc = Io.Uri(socket).Pickle_client() + local pickle = pc.pickle + pc.call(%> + local Hosting = require "luan:host/Hosting" + Hosting.do_push(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) + <%) + pc.close() +end + +function delete(domain,password) + local socket = "socket:" .. domain .. ":" .. port + local pc = Io.Uri(socket).Pickle_client() + local pickle = pc.pickle + pc.call(%> + local Hosting = require "luan:host/Hosting" + Hosting.do_delete(<%=pickle(domain)%>,<%=pickle(password)%>) + <%) + pc.close() +end