Skip to content

Commit

Permalink
Merge pull request #250 from nullstack/next
Browse files Browse the repository at this point in the history
📝 fix typo and deprecate cors
  • Loading branch information
Mortaro authored Dec 11, 2022
2 parents b319934 + 3f828e0 commit 6eace11
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions i18n/en-US/articles/server-request-and-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Other available keys are:

- **port**: `integer`
- **maximumPayloadSize**: `string`
- **cors**: `object`

```jsx
// server.js
Expand All @@ -52,16 +51,10 @@ const context = Nullstack.start(Application);
const { server } = context;
server.port = 3000;
server.maximumPayloadSize = '5mb';
server.cors = {
origin: 'http://localhost:6969',
optionsSuccessStatus: 200
}

export default context;
```

The `cors` object will be passed as the argument to [express cors plugin](https://expressjs.com/en/resources/middleware/cors.html).

## Request and Response

Every server function context is merged with the original `request` and `response` objects from Express.
Expand Down
2 changes: 1 addition & 1 deletion i18n/en-US/components/Home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ trinity:
- title: "Lightweight API requests"
image: "/illustrations/nulla-dps.webp"
text:
"Subsequent server functions will fetch JSON from an automaticallty
"Subsequent server functions will fetch JSON from an automatically
generated microservice API, deserialize the response, update the
aplication state, and rerender the page out of the box"
features:
Expand Down

0 comments on commit 6eace11

Please sign in to comment.