ssbc/ssb-viewer

Name: ssb-viewer

Owner: Secure Scuttlebutt Consortium

Description: null

Created: 2018-04-16 20:46:44.0

Updated: 2018-05-19 05:39:55.0

Pushed: 2018-04-25 19:35:32.0

Homepage: null

Size: 302

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ssb-viewer

HTTP server for read-only views of SSB content. Serves content as web pages or as scripts for embedding in other web pages.

Install & Run

As a sbot plugin:

r -p ~/.ssb/node_modules
/.ssb/node_modules
clone ssb://%MeCTQrz9uszf9EZoTnKCeFeIedhnKWuB3JHW2l1g9NA=.sha256 ssb-viewer && cd ssb-viewer
install
 plugins.enable ssb-viewer
start sbot

Or standalone:

clone ssb://%MeCTQrz9uszf9EZoTnKCeFeIedhnKWuB3JHW2l1g9NA=.sha256 ssb-viewer && cd ssb-viewer
install
n.js
Usage

To view a thread as a web page, navigate to a url like http://localhost:8807/%MSGID.

To embed a thread into another web page, load it as follows:

ipt src="http://localhost:8807/%MSGID.js"></script>

To add more than the base styles, you can also load http://localhost:8807/static/nicer.css.

Routes
Query options

The *_base query options overwrite the defaults set in the config. The base option is a fallback instead of specifying the URLs separately. The base options are mostly useful for embedding, where the script is embedded on a different origin than where ssb-viewer is running. However, you may not need them, as the ssb-viewer embed script will detect the base where it is included from.

Config

To change ssb-viewer's default options, edit your ~/.ssb/config, to have properties like the following:


iewer": {
"port": 8807,
"host": "::"


You can also pass these as command-line options to ./bin.js or sbot as, e.g. --viewer.port 8807.

References
License

Copyright (c) 2016-2017 Secure Scuttlebutt Consortium

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.