Skip to content

Commit

Permalink
add docs to readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
schehata committed Jan 26, 2023
1 parent 467323a commit d516b90
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ You can also disable logging completely by setting the log level to `off`:
export AXIOM_LOG_LEVEL=off
```

### getServerSideProps

To be able to use next-axiom with `getServerSideProps` you need to wrap your function with `withAxiomGetServerSideProps`, becasue there is no
way at the moment to automatically detected if getServerSideProps is used.

```ts
import { withAxiomGetServerSideProps } from 'next-axiom'
export const getServerSideProps = withAxiomGetServerSideProps(async ({ req, log }) => {
log.info('Hello, world!');
return {
props: {
},
}
});


### License

Distributed under the [MIT License](LICENSE).

0 comments on commit d516b90

Please sign in to comment.