nevexo-forge-js
v0.0.6
Published
A complete, promise-based Javascript SDK for the Laravel Forge API
Downloads
17
Readme
Forge JavaScript SDK
A complete, promise-based Javascript SDK for the Laravel Forge API
Installation
With yarn (recommended):
yarn add nevexo-forge-js
With npm:
npm install nevexo-forge-js
Basic Usage
import Forge from 'nevexo-forge-js';
// Instantiate the SDK
const forge = new Forge('API_TOKEN_HERE');
// List all servers
try {
const servers = await forge.servers.list();
console.log(servers);
} catch(error) {
console.log(error);
}
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.
Documentation
Full documentation coming soon. Until then, please see the tests for more detailed usage.
License
This project is open-sourced software licensed under the MIT license.