Skip to content

Commit 390863a

Browse files
committed
Create README.md
1 parent 95d80ed commit 390863a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Forge JavaScript SDK
2+
3+
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+
import Forge from '@nevexo/forge-js';
21+
22+
// Instantiate the SDK
23+
const forge = new Forge('API_TOKEN_HERE');
24+
25+
// List all servers
26+
try {
27+
const servers = await forge.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

Comments
 (0)