2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 12:43:17 +00:00
This commit is contained in:
2025-08-23 18:16:19 +03:00
parent c4b4a2e4cb
commit 0d4ea04ef4
21 changed files with 306 additions and 305 deletions

View File

@@ -13,14 +13,16 @@ internal class Program
private static async Task Main(string[] args)
{
// Create a store to keep objects.
var system = await Warehouse.Put("sys", new MemoryStore());
// Create a distibuted server
var esiurServer = await Warehouse.Put("sys/server", new DistributedServer());
// Add your object to the store
var service = await Warehouse.Put("sys/demo", new Demo());
var wh = new Warehouse();
var http = await Warehouse.Put<HTTPServer>("sys/http", new HTTPServer() { Port = 8888 });
// Create a store to keep objects.
var system = await wh.Put("sys", new MemoryStore());
// Create a distibuted server
var esiurServer = await wh.Put("sys/server", new DistributedServer());
// Add your object to the store
var service = await wh.Put("sys/demo", new Demo());
var http = await wh.Put<HTTPServer>("sys/http", new HTTPServer() { Port = 8888 });
http.MapGet("{url}", (string url, HTTPConnection sender) =>
@@ -49,7 +51,7 @@ internal class Program
// Start your server
await Warehouse.Open();
await wh.Open();
Console.WriteLine("Running on http://localhost:8888");