docs: fix some typos (#274)
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
description: |
|
description: |
|
||||||
Fresh's architechture is designed to make it easy to build fast, scalable, and reliable applications.
|
Fresh's architecture is designed to make it easy to build fast, scalable, and reliable applications.
|
||||||
---
|
---
|
||||||
|
|
||||||
Fresh is designed to makes it easy to build fast, scalable, and reliable
|
Fresh is designed to make it easy to build fast, scalable, and reliable
|
||||||
applications. To do this, it makes opinionated decisions about how one should
|
applications. To do this, it makes opinionated decisions about how one should
|
||||||
build web applications. These decisions are backed by strong emperial data
|
build web applications. These decisions are backed by strong empirical data
|
||||||
gathered from experts in the field. Some examples of these principles are:
|
gathered from experts in the field. Some examples of these principles are:
|
||||||
|
|
||||||
- Page load times should be reduced to a minimum.
|
- Page load times should be reduced to a minimum.
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ handler. This allows modifying or checking requests and responses. Common
|
|||||||
use-cases for this are logging, authentication, and performance monitoring.
|
use-cases for this are logging, authentication, and performance monitoring.
|
||||||
|
|
||||||
Each middleware gets passed a `next` function in the context argument that is
|
Each middleware gets passed a `next` function in the context argument that is
|
||||||
used trigger child handlers. The `ctx` also has a `state` property that can be
|
used to trigger child handlers. The `ctx` also has a `state` property that can
|
||||||
used to pass arbituary data to downstream (or upstream) handlers.
|
be used to pass arbitrary data to downstream (or upstream) handlers.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// routes/_middleware.ts
|
// routes/_middleware.ts
|
||||||
@@ -59,13 +59,13 @@ For a request to `/` the request will flow like this:
|
|||||||
1. The `routes/_middleware.ts` middleware is invoked.
|
1. The `routes/_middleware.ts` middleware is invoked.
|
||||||
2. Calling `ctx.next()` will invoke the `routes/index.ts` handler.
|
2. Calling `ctx.next()` will invoke the `routes/index.ts` handler.
|
||||||
|
|
||||||
For a request to `/admin` the request flow like this:
|
For a request to `/admin` the request flows like this:
|
||||||
|
|
||||||
1. The `routes/_middleware.ts` middleware is invoked.
|
1. The `routes/_middleware.ts` middleware is invoked.
|
||||||
2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts` middlware.
|
2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts` middlware.
|
||||||
3. Calling `ctx.next()` will invoke the `routes/admin/index.ts` handler.
|
3. Calling `ctx.next()` will invoke the `routes/admin/index.ts` handler.
|
||||||
|
|
||||||
For a request to `/admin/signin` the request flow like this:
|
For a request to `/admin/signin` the request flows like this:
|
||||||
|
|
||||||
1. The `routes/_middleware.ts` middleware is invoked.
|
1. The `routes/_middleware.ts` middleware is invoked.
|
||||||
2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts`
|
2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts`
|
||||||
|
|||||||
Reference in New Issue
Block a user