Example #1
0
        public HomeModule()
        {
            Get["/"] = _ => {
                return(View["index.cshtml"]);
            };
            Post["/results"] = _ => {
                string        userString = Request.Form["user-string"];
                string        findWord   = Request.Form["find-word"];
                RepeatCounter newCounter = new RepeatCounter(userString, findWord);
                int           result     = newCounter.CountRepeats();
                return(View["results.cshtml", result]);
            };

            Post["/new"] = _ => {
                return(View["index.cshtml"]);
            };
        }