Skip to content

Commit

Permalink
update session in config.md docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Calder committed Nov 21, 2022
1 parent f05c431 commit 46f0996
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions docs/pages/docs/config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ export default config({
maxFileSize: 200 * 1024 * 1024,
healthCheck: true,
{% if $nextRelease %}
extendExpressApp: (app, context) => { /* ... */ },
extendHttpServer: (httpServer, context, graphQLSchema) => { /* ... */ },
extendExpressApp: (app, commonContext) => { /* ... */ },
extendHttpServer: (httpServer, commonContext, graphQLSchema) => { /* ... */ },
{% else /%}
extendExpressApp: (app, createContext) => { /* ... */ },
extendHttpServer: (httpServer, createContext, graphQLSchema) => { /* ... */ },
Expand Down Expand Up @@ -338,7 +338,7 @@ The created context will be bound to the request, including the current visitor'

_ProTip!_: `extendExpressApp` can be `async`

## extendHttpServer
### extendHttpServer

This lets you interact with the node [http.Server](https://nodejs.org/api/http.html#class-httpserver) that Keystone uses.

Expand Down Expand Up @@ -394,18 +394,11 @@ import type { SessionStrategy } from '@keystone-6/core/types';
The `session` config option allows you to configure session management of your Keystone system.
It has a TypeScript type of `SessionStrategy<any>`.

{% if $nextRelease %}
In general you will use `SessionStrategy` objects from the `@keystone-6/auth/session` package, rather than writing this yourself.
{% else /%}
In general you will use `SessionStrategy` objects from the `@keystone-6/core/session` package, rather than writing this yourself.
{% /if %}


```typescript
{% if $nextRelease %}
import { statelessSessions } from '@keystone-6/auth/session';
{% else /%}
import { statelessSessions } from '@keystone-6/core/session';
{% /if %}

export default config({
session: statelessSessions({ /* ... */ }),
Expand Down

0 comments on commit 46f0996

Please sign in to comment.