Skip to content

Commit a0b9c76

Browse files
authored
Minor fixes from PR comments
1 parent 86cda85 commit a0b9c76

File tree

1 file changed

+3
-2
lines changed
  • src/connections/sources/catalog/libraries/server/node

1 file changed

+3
-2
lines changed

src/connections/sources/catalog/libraries/server/node/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,9 @@ const appAnalytics = new Analytics({ writeKey: 'APP_WRITE_KEY' });
559559
Segment attempts to use the global `fetch` implementation if available in order to support several diverse environments. Some special cases (for example, http proxy) may require a different implementation for http communication. You can provide a customized wrapper in the Analytics configuration to support this. Here are a few approaches:
560560
561561
Use a custom fetch-like implementation with proxy (simple, recommended)
562-
```
562+
```javascript
563563
import { HTTPFetchFn } from '../lib/http-client'
564+
import axios from 'axios'
564565
565566
const httpClient: HTTPFetchFn = async (url, options) => {
566567
return axios({
@@ -578,7 +579,7 @@ const httpClient: HTTPFetchFn = async (url, options) => {
578579
})
579580
}
580581
581-
new Analytics({
582+
const analytics = new Analytics({
582583
writeKey: '<YOUR_WRITE_KEY>',
583584
httpClient,
584585
})

0 commit comments

Comments
 (0)