Skip to main content

Basic setup

Create a new project and install Sorionlib:
mkdir my-project
cd my-project
npm init -y
npm install sorionlib

Create your first client

Create an index.js file:
import { Sorion } from "sorionlib";

const client = new Sorion();
client.start();
Run your application:
node index.js

Add configuration

Customize the client with options:
import { Sorion } from "sorionlib";

const client = new Sorion({
  logging: true,
  prefix: "!"
});

client.start();

Use core utilities

Access built-in helper functions:
import { Sorion, utils } from "sorionlib";

const client = new Sorion();

// String utilities
const slug = utils.slugify("Hello World");
console.log(slug); // "hello-world"

// Array utilities
const unique = utils.unique([1, 2, 2, 3]);
console.log(unique); // [1, 2, 3]

client.start();

Next steps

Now that you have Sorionlib running, explore: