SocialvoidJS/README.md

1.3 KiB

SocialvoidJS

Deno, Node.js and browser Socialvoid client.

Introduction

SocialvoidJS is a Deno Socialvoid client which is backported to Node.js using the tool deno2node. Also, it can be bundled for browsers using the bundle command of Deno or with Webpack.

Features

  • Everything works on Node.js, Deno and browsers (2 ways).
  • Multiple ways to store session and other data: MemoryStore, FileStore, LocalStorageStore and the ones you define!
  • Typings for Socialvoid types.
  • Most thrown errors can be used with instanceof.
  • CDN upload and download support.
  • Account, Cloud, Help and Network methods.
  • Capability of sending raw requests.

Bundling for browsers

npm run bundle:deno

Method 2: Webpack

npm run build

Using with Next.js

SocialvoidJS can be used with Next.js, with the following configuration:

{
  webpack: (config) => {
    if (typeof config.resolve.fallback !== "undefined") {
      config.resolve.fallback.fs = false;
    }

    return config;
  },
}

React.js support is untested, but should work if you can configure Webpack like mentioned in above.

Examples

See examples/.