2017-01-09 20:52:56 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using IotWeb.Server;
|
|
|
|
|
using IotWeb.Common.Http;
|
|
|
|
|
namespace Nibriboard
|
|
|
|
|
{
|
|
|
|
|
public class Nibriboard
|
|
|
|
|
{
|
|
|
|
|
private HttpServer httpServer;
|
|
|
|
|
|
|
|
|
|
public readonly int Port = 31586;
|
|
|
|
|
|
|
|
|
|
public Nibriboard()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Setup()
|
|
|
|
|
{
|
|
|
|
|
httpServer = new HttpServer(Port);
|
|
|
|
|
httpServer.AddHttpRequestHandler(
|
2017-01-10 19:51:49 +00:00
|
|
|
|
"/",
|
|
|
|
|
new HttpResourceHandler(
|
|
|
|
|
Assembly.GetExecutingAssembly(),
|
|
|
|
|
"Nibriboard",
|
|
|
|
|
"index.hmtl"
|
|
|
|
|
)
|
2017-01-09 20:52:56 +00:00
|
|
|
|
);
|
2017-01-10 19:51:49 +00:00
|
|
|
|
httpServer.Start();
|
2017-01-09 20:52:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|