Esempio n. 1
0
        public static void Main()
        {
            var t = new Thread(blink);
            t.Start();

            var webServer = new HttpServer();
            webServer.RelayDomain = "gsiot-bcjp-yj88";
            webServer.RelaySecretKey = "HDMvyM11hAu6H6cxIaT50dL9ALWc81MYB8H/UFhV";
            webServer.RequestRouting.Add("GET /hello", HandleHello);
            webServer.RequestRouting.Add("GET /temp", HandleTemp);
            webServer.RequestRouting.Add("GET /on", HandleOn);
            webServer.RequestRouting.Add("GET /off", HandleOff);
            // allow on off to send via POST (xively) ...
            webServer.RequestRouting.Add("POST /on", HandlePostOn);
            webServer.RequestRouting.Add("POST /off", HandlePostOff);

            webServer.RequestRouting.Add("GET /toggle", HandleToggle);
            webServer.Run();
        }