@liquiditeam/app-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Liquiditeam app-sdk

import initAppSDK from '@liquiditeam/app-sdk';
import cookieParser from 'cookie-parser';
import express, { Router } from 'express';

const config = {
  appBaseUrl: 'http://example.com', // the base url of the app
  appStoreAppName: 'example-app', // the name of the app in the app store
  appStoreGraphqlUrl: 'https://appstore.fan-platform.com',
  appStoreGraphqlWsUrl: 'wss://appstore.fan-platform.com',
  fanIdBaseUrl: 'https://me.fan',
  clientId: '123456', // of the fan id oauth app
  clientSecret: '987654', // of the fan id oauth app
};

const app = express();
const router = Router();
const sdk = initAppSDK(config);

// add routes to router

app.use(cookieParser());
app.use(sdk.middleware(router));

const main = async () => {
  await sdk.fetchInstallations(app.locals);

  sdk.subscribeToInstallationChanges(app.locals);

  app.listen(PORT, () => {
    console.log(`Listening on port ${PORT}`);
  });
};

main();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.42latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.42
0.1.4-dev.00
0.1.31
0.1.20
0.1.2-dev.10
0.1.2-dev.00
0.1.10
0.1.1-dev.11
0.1.1-dev.00
0.1.00
0.0.120
0.0.110
0.0.11-alpha.00
0.0.100
0.0.10-alpha.00
0.0.90
0.0.80
0.0.8-development.20
0.0.8-development.10
0.0.8-development.01
0.0.70
0.0.7-development.10
0.0.7-development.00
0.0.60
0.0.5-development.10
0.0.5-development.00
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @liquiditeam/app-sdk

Weekly Downloads

5

Version

0.1.4

License

MIT

Unpacked Size

98.2 kB

Total Files

36

Last publish

Collaborators

  • jisensee
  • jfritsch
  • roydigerhund
  • nigimaxx