Skip to content

Commit dcd5369

Browse files
committed
chore: lite example
1 parent 176cd07 commit dcd5369

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

clients/algoliasearch-client-javascript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Add the following JavaScript snippet to the <head> of your website:
5353
You can now import the Algolia API client in your project and play with it.
5454

5555
```js
56-
import { liteClient } from 'algoliasearch';
56+
import { algoliasearch } from 'algoliasearch';
5757

5858
const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');
5959
```

templates/javascript/clients/README.mustache

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@ You can now import the Algolia API client in your project and play with it.
5555
```js
5656
{{^isAlgoliasearchClient}}
5757
import { {{apiName}} } from '{{npmPackageName}}';
58+
59+
const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
5860
{{/isAlgoliasearchClient}}
5961
{{#isAlgoliasearchClient}}
6062
import { algoliasearch } from '{{npmPackageName}}';
61-
{{/isAlgoliasearchClient}}
63+
64+
const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');
65+
66+
// or with the lite client
67+
import { liteClient } from '{{npmPackageName}}/lite';
6268

6369
const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
70+
{{/isAlgoliasearchClient}}
6471
```
6572

6673
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.

0 commit comments

Comments
 (0)