public static void Main(string[] args) { var app = new VulpixServer(); var foo = new MyController(); app.AddRoute("GET", "/", foo.Index); app.Use(new BodyParser().Exec); app.Listen(5000); }
public static void Main(string[] args) { var app = new VulpixServer(); app.UseStaticFolder("Public"); //entry point for polymer app.AddRoute("GET", "/", (Req req, Res res) => { res.Response.SendFileAsync("Public/index.html"); }); //Add route var DataControlleur = new DataControlleur(); app.AddRoute("GET", "/Data", DataControlleur.GetData); app.Listen(3000); }