@balena/jellyfish-plugin-discourse

Jellyfish Discourse Plugin

Provides a sync integration for Discourse.

Usage

Below is an example how to use this library:

import { discoursePlugin } from '@balena/jellyfish-plugin-discourse';
import { PluginManager } from '@balena/jellyfish-worker';

// Load contracts from this plugin
const pluginManager = new PluginManager([discoursePlugin()]);
const contracts = pluginManager.getCards();
console.dir(contracts);

Documentation

Visit the website for complete documentation: https://product-os.github.io/jellyfish-plugin-discourse

Testing

Unit tests can be easily run with the command npm test.

You can run integration tests locally against Postgres and Redis instances running in docker-compose:

git submodule update --init
git secret reveal -f
npm run compose
export INTEGRATION_DISCOURSE_TOKEN=$(cat .balena/secrets/integration_discourse_token)
export INTEGRATION_DISCOURSE_USERNAME=$(cat .balena/secrets/integration_discourse_username)
REDIS_HOST=localhost POSTGRES_HOST=localhost npx jest test/integration/mirror.spec.ts

You can also access these Postgres and Redis instances:

PGPASSWORD=docker psql -hlocalhost -Udocker
redis-cli -h localhost

Generated using TypeDoc