You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A complete, promise-based Javascript SDK for the Laravel Forge API
4
8
5
9
## Installation
6
10
7
-
With yarn (*recommended*):
8
-
```bash
11
+
With yarn (_recommended_):
12
+
13
+
```bash
9
14
yarn add nevexo-forge-js
10
15
```
11
16
12
17
With npm:
13
-
```bash
18
+
19
+
```bash
14
20
npm install nevexo-forge-js
15
21
```
16
22
17
23
## Basic Usage
18
24
19
-
```js
25
+
```js
20
26
importForgefrom'nevexo-forge-js';
21
27
22
28
// Instantiate the SDK
@@ -26,12 +32,12 @@ const forge = new Forge('API_TOKEN_HERE');
26
32
try {
27
33
constservers=awaitforge.servers.list();
28
34
console.log(servers);
29
-
} catch(error) {
35
+
} catch(error) {
30
36
console.log(error);
31
37
}
32
38
```
33
39
34
-
> The SDK utilizes native ES6 promises so you should use async/await to handle the resolved promise. You can, of course, use ```.then()``` and ```.catch()``` if you prefer.
40
+
> The SDK utilizes native ES6 promises so you should use async/await to handle the resolved promise. You can, of course, use `.then()` and `.catch()` if you prefer.
0 commit comments