Skip to content

Commit

Permalink
docs: minor tweaks (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich authored Oct 30, 2024
1 parent 7def381 commit 18dee55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/1.guide/0.why.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ server.listen(3000, () => {

Whenever a new request is received, the request event is called with two objects: a request `req` object ([node:IncomingMessage][IncomingMessage]) to access HTTP request details and a response `res` object ([node:ServerResponse][ServerResponse]) that can be used to prepare and send a HTTP response. Popular framework such as [Express](https://expressjs.com/) and [Fastify](https://fastify.dev/) are also based on Node.js server API.

Recent javascript server runtimes like [Deno][Deno] and [Bun][Bun] have a different way to define a server which is similar to web [fetch][fetch] API.
Recent JavaScript server runtimes like [Deno][Deno] and [Bun][Bun] have a different way to define a server which is similar to web [fetch][fetch] API.

**Example:** [Deno][Deno] HTTP server ([learn more](https://docs.deno.com/api/deno/~/Deno.serve)):

Expand All @@ -40,7 +40,7 @@ As you probably noticed, there is a difference between [Node.js][Node.js] and [D

There are subtle differences between [Deno][Deno] and [Bun][Bun] too in the way to provide options, server lifecycle, access to request info such as client IP which is not part of [Request][Request] standard are some examples.

Main use-case of this library is for tools and frameworks that want to be runtime agnostic. By using srvx as standard server layer, instead of depending on of the individual runtime APIs, we push javascript ecosystem to be more consistent and moving towards web standards!
Main use-case of this library is for tools and frameworks that want to be runtime agnostic. By using srvx as standard server layer, instead of depending on of the individual runtime APIs, we push JavaScript ecosystem to be more consistent and moving towards web standards!

## How is it different?

Expand Down
2 changes: 1 addition & 1 deletion docs/1.guide/2.handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ serve({
> srvx **never** patches, overrides or extends globals such as [Request][Request] and [Response][Response]. Only few lazy getters prefixed with `x` will optionally be added to the `request` object instance to allow server adoption of [Request][Request].
> [!TIP]
> You can use `xRequest` type for typescript usage.
> You can use `xRequest` type for TypeScript usage.
### `request.xRemoteAddress?`

Expand Down

0 comments on commit 18dee55

Please sign in to comment.