Skip to content

Commit

Permalink
Merge pull request #246 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat(ctx): add html method
  • Loading branch information
jlenon7 authored Jan 16, 2025
2 parents 6466917 + b9790bd commit fdad8d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/rest-api-application/request-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ Route.get('/welcome', ({ response }) => {
})
```

#### The `html()` method

Terminate the request rendering an HTML string in the response
body to the client:

```typescript
Route.get('/welcome', ({ response }) => {
response.html('<h1>Hello World!</h1>')
})
```

#### The `view()` method

Terminate the request rendering a view in the response
Expand Down
3 changes: 1 addition & 2 deletions docs/rest-api-application/web-application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ default value inside the `vite.config.ts` file.

With this option set, SSR will be turn on into your application.
This defines where Vite needs to look when compiling your server
entrypoint files and when searching for the default entrypoint to
render when using `response.render()` method.
entrypoint files.

Default: `src/resources/app/app.tsx`

Expand Down

0 comments on commit fdad8d1

Please sign in to comment.