Program.cs 882 B

12345678910111213141516171819202122232425262728293031
  1. using GenHTTP.Core;
  2. using GenHTTP.Modules.Core;
  3. using GenHTTP.Modules.Webservices;
  4. using Benchmarks.Tests;
  5. namespace Benchmarks
  6. {
  7. public static class Program
  8. {
  9. public static int Main(string[] args)
  10. {
  11. var tests = Layout.Create()
  12. .Add("plaintext", Content.From("Hello, World!"))
  13. .Add("fortunes", new FortuneHandlerBuilder())
  14. .Add<JsonResource>("json")
  15. .Add<DbResource>("db")
  16. .Add<QueryResource>("queries")
  17. .Add<UpdateResource>("updates")
  18. .Add<CacheResource>("cached-worlds");
  19. return Host.Create()
  20. .Handler(tests)
  21. .Run();
  22. }
  23. }
  24. }