Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
felipelealdefaria authored Feb 20, 2021
1 parent 4f82281 commit 90da548
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm i @felipelealdefaria/experiments-service
**1) Initialize:**

```
import { experiment } from 'experiments-service'
import { experiment } from '@felipelealdefaria/experiments-service'
const session = await experiment.init({ baseUrl: string }): Promise<InitResponse>
```
Expand Down Expand Up @@ -49,6 +49,21 @@ key: force-${experimentName}
value: ${variation_option}
```

### Possible error for those using webpack

The dependency of the project, **sixpack-client** has incompatibility with some versions of the webpack. The common error in this case may be linked to not being able to resolve the **http** and **buffer** dependencies.

To fix it, in your **webpack.config.js** file:

``` // webpack.config.js
resolve: {
fallback: {
http: require.resolve('stream-http'),
buffer: require.resolve('buffer/')
}
}
```

### Service's Architecture

Service created using the principles of Clean Architecture with the intention of facilitating maintenance and a possible exchange of lib used to perform A/B tests.
Expand Down

0 comments on commit 90da548

Please sign in to comment.