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
+
5
+
## Installation
6
+
7
+
With yarn (*recommended*):
8
+
```bash
9
+
yarn add @nevexo/forge-js
10
+
```
11
+
12
+
With npm:
13
+
```bash
14
+
npm install @nevexo/forge-js
15
+
```
16
+
17
+
## Basic Usage
18
+
19
+
```js
20
+
importForgefrom'@nevexo/forge-js';
21
+
22
+
// Instantiate the SDK
23
+
constforge=newForge('API_TOKEN_HERE');
24
+
25
+
// List all servers
26
+
try {
27
+
constservers=awaitforge.servers.list();
28
+
console.log(servers);
29
+
} catch(error) {
30
+
console.log(error);
31
+
}
32
+
```
33
+
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.
35
+
36
+
## Documentation
37
+
38
+
Full documentation coming soon. Until then, please see the tests for more detailed usage.
39
+
40
+
## License
41
+
42
+
This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
0 commit comments