Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: minor tweaks #9

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading