Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local server = "localhost:3000"
- local fetchPath = "http://"..server.."/fetch"
- function poll()
- local fetched = http.get(fetchPath)
- local data = fetched.readAll()
- if data == nil or data == '' then
- else
- print "Got a program!"
- print "Executing..."
- local func = loadstring(data)
- func()
- print "Done."
- end
- end
- while true do
- print "."
- poll()
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement