public void Run() { var app = new SimpleApp(fu.Map.Controller(new MyController())); app.Services.Add(new InMemorySessionService<IMySession>()); app.Services.Add(new FormDataParser()); app.Start(); }
public void Run() { var pipeline = fu.If(isFolder, listFiles(), fu.Static.Folder("/", "Content")); var app = new SimpleApp(pipeline); app.Start(); }
public static void Main(string[] args) { var app = new SimpleApp(fu.Map.Urls(new ContMap() { { "^/$", fu.Static.File("index.html") }, { "^/greet$", fu.Map.Post().Then(showGreet()) }, })); app.Services.Add(new ModelBinder<MyModel>()); app.Services.Add(new FormDataParser()); app.Start(); }
public static void Main(string[] args) { var app = new SimpleApp(fu.Map.Urls(new Dictionary<string, Continuation> { { "^/$", fu.Static.File("index.html") }, { "^/save$", echoName() } })); app.Services.Add(new FormDataParser()); app.Start(); }
public static void Main(string[] args) { var app = new SimpleApp(fu.Static.Text("Hello World!!")); app.Start(); }