Skip to content

Commit 5f15c39

Browse files
committed
refactor(documentation): update
1 parent 85ac86b commit 5f15c39

4 files changed

Lines changed: 19 additions & 20 deletions

File tree

documentation/simplew/docs/addons/helper-hosting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var builder = SimpleWHost.CreateApplicationBuilder(args);
5050

5151
builder.ConfigureSimpleW(server => {
5252
server.MapGet("/hello", () => {
53-
return new { mesage = "Hello World !" };
53+
return new { message = "Hello World !" };
5454
});
5555
});
5656

@@ -95,7 +95,7 @@ builder.ConfigureSimpleW(server => {
9595
server.UseHttps(); // native SimpleW HTTPS support, see documentation
9696
9797
server.MapGet("/hello", () => {
98-
return new { mesage = "Hello World !" };
98+
return new { message = "Hello World !" };
9999
});
100100
});
101101
```

documentation/simplew/docs/guide/observability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ server.ConfigureTelemetry(options => {
194194
options.IncludeStackTrace = true;
195195
options.EnrichWithHttpSession = (activity, session) => {
196196
// override host with the X-Forwarded-Host header (set by a trusted reverse proxy)
197-
if (session.Request.Headers.TryGetValue("X-Forwarded-Host", out string? host) {
197+
if (session.Request.Headers.TryGetValue("X-Forwarded-Host", out string? host)) {
198198
activity.SetTag("url.host", host);
199199
}
200200
};

documentation/simplew/docs/index.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ hero:
2626
features:
2727
- icon:
2828
title: Zero Dependencies, Maximum Speed
29-
details: Built on top of native sockets. Minimal overhead, instant startup and high-performance workloads.
29+
details: Built on top of native sockets. Minimal overhead, instant startup and strong performance under load.
3030
- icon: 🌐
3131
title: Flexible Web Server
3232
details: Handle APIs, static files, and dynamic content through a simple routing model — with full control over behavior.
3333
- icon: 🛡️
3434
title: Production-Grade Core
35-
details: A fully integrated core designed for real-world usage covering security, communication, and observability without external dependencies.
35+
details: A fully integrated core designed for real-world usage, covering security, communication, and observability without external dependencies.
3636
- icon: 🧩
3737
title: Powerful Addons
3838
details: Designed for extensibility. Integrate additional capabilities through independent modules without bloating your core.
@@ -57,7 +57,7 @@ server.MapGet("/api/test/hello", () => {
5757
return new { message = "Hello World !" };
5858
});
5959
60-
// start a blocking background server
60+
// run server
6161
await server.RunAsync();
6262
```
6363

@@ -90,12 +90,6 @@ class Program {
9090
// telemetry
9191
server.ConfigureTelemetry(options => {
9292
options.IncludeStackTrace = true;
93-
options.EnrichWithHttpSession = (activity, session) => {
94-
// override host with the X-Forwarded-Host header (set by a trusted reverse proxy)
95-
if (session.Request.Headers.TryGetValue("X-Forwarded-Host", out string? host) {
96-
activity.SetTag("url.host", host);
97-
}
98-
};
9993
});
10094
10195
// socket tuning
@@ -119,7 +113,7 @@ class Program {
119113
options.AllowRules.Add(IpRule.Cidr("10.0.0.0/8"));
120114
options.AllowRules.Add(IpRule.Single("127.0.0.1"));
121115
options.MaxMindCountryDbPath = "/app/data/GeoLite2-Country.mmdb";
122-
options.AllowCountries.Add(CountryRule.Any("US"));
116+
options.AllowCountries.Add(CountryRule.Any("FR"));
123117
});
124118
125119
// OpenID
@@ -132,7 +126,7 @@ class Program {
132126
});
133127
});
134128
135-
// start a blocking background server
129+
// run server
136130
await server.RunAsync();
137131
}
138132
}
@@ -166,10 +160,10 @@ builder.ConfigureSimpleW(server => {
166160
});
167161
// routes
168162
server.MapGet("/hello", () => {
169-
return new { mesage = "Hello World !" };
163+
return new { message = "Hello World !" };
170164
});
171165
// ssl
172-
X509Certificate2 cert = new(@"C:\Users\SimpleW\ssl\domain.pfx", "password");
166+
X509Certificate2 cert = new(@"/app/ssl/domain.pfx", "password");
173167
var sslcontext = new SslContext(SslProtocols.Tls12 | SslProtocols.Tls13, cert, clientCertificateRequired: false, checkCertificateRevocation: false);
174168
server.UseHttps(sslcontext);
175169
},

documentation/simplew/docs/version/faq.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ Because I strongly believe in open source, and I use open-source software every
1313
1414
Github is just a mirror. Ping me, if your code is interesting and still MIT license, I will pull from your repo.
1515

16+
> Do I need the ASP.NET runtime ?
17+
18+
Hell no. SimpleW targets the standard .NET runtime — no ASP.NET overhead, no bloat.
19+
That said, if you want to run both side by side, nothing stops you from using the ASP.NET runtime — SimpleW will work just fine.
20+
1621
> Why do you hate ASP.NET Core ?
1722
1823
I don't hate it, but I don't like it (see the paragraph about [Why this library exists](../guide/what-is-simplew.md#why-this-library)).
1924

25+
> Do you like Kestrel ?
26+
27+
Kestrel is an awesome server. I just want a serious alternative to its hegemony.
28+
2029
> Why is there no DI in SimpleW like in ASP.NET Core?
2130
2231
I really deeply hate how Dependency Injection works in ASP.NET Core. I hate how the framework resolves the full dependency graph recursively and instantiates everything through a DI container :
@@ -25,10 +34,6 @@ I really deeply hate how Dependency Injection works in ASP.NET Core. I hate how
2534
- It tends to hide the actual object graph, which can make the execution flow harder to understand and debug
2635
- It usually introduces a fair amount of boilerplate and configuration for relatively simple use cases
2736

28-
> Do you like Kestrel ?
29-
30-
Kestrel is an awesome server. I just want a serious alternative to its hegemony.
31-
3237
> What is the primary goal of SimpleW ?
3338
3439
It's in the name : **simplicity first** ! <br />

0 commit comments

Comments
 (0)