aula.js is a robust, flexible, modular TypeScript library engineered for scalable Aula platform integrations. Framework-agnostic with full TypeScript support, it empowers developers to deliver reliable, maintainable applications.
- Full support for both REST and Gateway APIs
- Modular and extensible architecture
- Strongly-typed methods and interfaces using TypeScript
- Framework-agnostic: You can use aula.js in any environment that supports ES modules.
npm install aula.js@alpha
To build the library locally:
- Clone the repository:
git clone https://github.com/michironoaware/aula.js.git
- Go to the repository directory:
cd aula.js
- Restore the dependencies:
npm install
- Build the package:
npm run dist
If you want to generate local API documentation using TypeDoc:
npm run docs
Or with expanded entry points:
npm run docs-expanded
A simple application that connects to the gateway API and logs user information:
import { GatewayClient } from "aula.js";
await using gateway = new GatewayClient()
.withToken("<AUTH_TOKEN_PLACEHOLDER>")
.withAddress(new URL("https://localhost:5018"))
.withIntents(0);
gateway.on("Ready", async event =>
{
console.log("Client is ready!");
console.log(`Logged in as: ${event.user.displayName}`);
});
console.log("Connecting...");
await gateway.connect();
await gateway.waitForDisconnect();