Created
January 6, 2014 13:10
-
-
Save Pondidum/8282678 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <viewdata model="EmbeddedSharpFubuSite.HomeViewModel" /> | |
| <h1>Hi, I'm an index.</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EmbeddedSharpFubuSite | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| using (var server = EmbeddedFubuMvcServer.For<SimpleApplication>()) | |
| { | |
| Console.WriteLine("Some long running process, with a web-backend on :5500"); | |
| Console.ReadKey(); | |
| } | |
| } | |
| } | |
| public class TestRegistry : FubuRegistry | |
| { | |
| public TestRegistry() | |
| { | |
| Import<SparkEngine>(); | |
| } | |
| } | |
| public class SimpleApplication : IApplicationSource | |
| { | |
| public FubuApplication BuildApplication() | |
| { | |
| return FubuApplication.For<TestRegistry>().StructureMap(); | |
| } | |
| } | |
| public class HomeEndpoint | |
| { | |
| public string get_test() | |
| { | |
| return "Hi, I'm a test."; | |
| } | |
| public HomeViewModel get_index() | |
| { | |
| return new HomeViewModel(); | |
| } | |
| } | |
| public class HomeViewModel | |
| { | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment