Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artcom/topic-browser


https://github.com/artcom/topic-browser

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Topic Browser

This project provides a web frontend for retained topics served by the [HiveMQ Retained Message Query Plugin](https://github.com/artcom/hivemq-retained-message-query-plugin).

## Setup

The topic browser can be configured either with env variables or with a config.json file, which needs to be served beside the sources. Provide Username and password, if the broker is used with the [HiveMQ file RBAC extension](https://www.hivemq.com/extension/file-rbac-extension/).

### Env variables

```bash
WS_BROKER_URI=""
HTTP_BROKER_URI=""
USERNAME=""
PASSWORD=""
```

### Config file

```json
{
"wsBrokerUri": "",
"httpBrokerUri": "",
"username": "",
"password": ""
}
```

## Local Development Server

Copy `config.json.template` into `public/config.json` and edit properties or use env variables.

For production build test `npm run start`, copy `config.json.template` into `dist/config.json` and edit properties or use env variables.

## Deployment

### As a Dokku service

The service can be deployed to Dokku using the Node.js buildpack.

- add dokku server as remote
```bash
git remote add dokku@:topic-browser
```

- on first deployment
```bash
ssh dokku@ apps:create topic-browser
```

- set configuration
```bash
ssh dokku@ config:set topic-browser HTTP_BROKER_URI= WS_BROKER_URI=
```

- deploy to server
```bash
git push master
```

### As static from a web server

- Build
```bash
npm run build
```

- Configure

Add a `dist/config.json` file with properties as in `config.json.template`

- Serve

Serve the `dist` folder.