Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
driescroons committed May 16, 2019
1 parent 0cba0a1 commit 369032c
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,27 @@ This package is a simple helper so you can easily integrate the Pling API into y

## 👉 Implementation

Implemeting it is quite easy. First install it.
Implemeting it is quite easy. First install it:

```
yarn add pling
```

### 🤖 Node

Importing the package
Importing the package:

```
const notify = require("pling");
```

Copy and paste the following where you'd like to log something.
In Typescript:

```
import * as notify from "pling";
```

Copy and paste the following where you'd like to log something:

```
await notify({
Expand All @@ -32,21 +38,21 @@ await notify({
});
```

Please make sure to set your **PLING_API_KEY** environment variable. In Node, you can do so by doing the following.
Please make sure to set your **PLING_API_KEY** environment variable. In Node, you can do so by doing the following:

```
process.env[PLING_API_KEY] = "YOUR_API_KEY";
```

### 🤖 React / Vue / Angular

Importing the package
Importing the package:

```
import notify from "pling";
import * as notify from "pling";
```

Copy and paste the following where you'd like to log something.
Copy and paste the following where you'd like to log something:

```
await notify({
Expand All @@ -56,9 +62,9 @@ Copy and paste the following where you'd like to log something.
});
```

Please make sure to set your **PLING_API_KEY** environment variable.
Please make sure to set your **PLING_API_KEY** environment variable:

In create react app, you can do so by creating a **.env** file in the root and specifying the following. Make sure to change the **_PLING_API_KEY_** to **_REACT_APP_PLING_API_KEY_**
In create react app, you can do so by creating a **.env** file in the root and specifying the following. Make sure to change the **_PLING_API_KEY_** to **_REACT_APP_PLING_API_KEY_**:

```
REACT_APP_PLING_API_KEY=YOUR_API_KEY_HERE
Expand Down

0 comments on commit 369032c

Please sign in to comment.