• Stars
    star
    333
  • Rank 126,599 (Top 3 %)
  • Language
    CoffeeScript
  • License
    Other
  • Created almost 11 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Federated Wiki - node server as npm package

Federated Wiki (Node.js server version)

The original wiki was written in a week and cloned within a week after that. The concept was shown to be fruitful while leaving other implementers room to innovate. When we ask for simple, we are looking for the same kind of simplicity: nothing to distract from our innovation in federation. -- Smallest Federated Wiki

Since the earlier creation of the node version, to complement the original Ruby implementation, there has been a risk of the two versions diverging. A first step to prevent divergence was to extract the client code into the wiki-client. This wiki-client was then used by both the Ruby and Node servers. However, with both server repositories retained the static components of the client, together with the plug-ins there remained some risk of divergence.

In this latest version of the node version of Federated Wiki, we continue by:

  • including all the client components in the wiki-client, and
  • moving all plug-ins into their own repositories, see below for a list.

When we originally extracted the wiki-client, we included it back into wiki whilst building the wiki package. This had the unforeseen consequence that when creating an updated wiki-client it was also necessary to create a new version of the wiki package for the updated client to be available. To avoid this we no longer include wiki packages in the package for the server.

Here we have a new wiki repository, and package, which only exist to pull together the federated wiki modules (wiki-server, wiki-client, and plug-ins) and start the server.

Using Federated Wiki

Learn how to wiki by reading fed.wiki.org

Running your own Server

The quickest way to set up wiki on your local machine is to install it globally with npm:

$ npm install -g wiki
$ wiki

Visit localhost:3000 to see your wiki. If you choose a host visible to the internet then others in the federation can use your work.

Running a test server

If you would prefer to test wiki without installing system wide, you can do the following (in a directory of your choice):

$ npm install wiki --global-style
$ npx wiki --data ./data

Without the --data argument, running wiki (installed globally or otherwise) will store data in ~/.wiki.

N.B. The wiki packages must to be installed with --global-style to work.

Updating the Server Software

From time to time some of the packages that makeup the wiki software will be updated. To see if updates are available for any of the wiki packages, run:

$ npm outdated --silent -g | grep '^Package\|^wiki'

If there are any updates available, the globally installed wiki can be updated by re-installing it:

$ npm install -g wiki

We have to install as running npm update -g wiki will only work if the wiki package itself has been updated.

An alternative approach would be to run npm update in the directory containing the wiki install. The location for running this will vary depending on which platform you are on.

If you installed the wiki package locally, rather than globally, you can run npm outdated --silent | grep '^Package\|^wiki' and npm update in the directory you installed the wiki package.

Server Options

Options for the server can be passed in many ways:

  • As command line flags
  • As a configuration JSON file specified with --config
  • As a config.json file in the root folder or cwd.
  • As env vars prefixed with wiki_

Higher in the list takes precedence. The server will then try to guess all unspecified options.

Configuring Security

By default a default security module is configured. This makes the wiki read only.

Details on how to configure the bundled Passport based security module, and the migration from using Mozilla Persona, see security configuration

N.B. The Mozilla Persona service closes on 30th November 2016.

Neighborhood Seeding

Two options are added for seeding a neighborhood.

When running a server farm --autoseed will populate the neighborhood with the other sites in the farm that have been visited.

Adding --neighbours 'comma separated list of sites' will add those sites to the neighborhood.

Datastore options


NOTE: This release sees a change in how the support for different datastores is provided, and how they are configured. The previous configuration method is depreciated, and will be removed in a future version.

There are a number of legacy database page stores

  • they DO NOT work with wiki in farm mode.

A number of datastores are supported. Use the --database and --data options to configure, or use the config.json.

The default location of the datastore is ~/.wiki, which contains two sub-directories pages and status:

  • pages is used with flatfiles, or leveldb, to store your pages, and
  • status stores the site's favicon, and a file containing the identity (email address) of the site owner.

flatfiles (default)

The default path to store page data is in a "default-data" subdirectory of the install directory. You can override it like this:

$ wiki --data FILESYSTEM_PATH

leveldb

Support for leveldb is added by installing the wiki-storage-leveldb package, this can be achieved by running npm install wiki-storage-leveldb -save in this directory.

The leveldb datastore uses JSON encoded leveldb format and is configured by providing a filesystem path:

$ wiki --database '{"type": "leveldb"}' --data FILESYSTEM_PATH

The leveldb datastore allows for a graceful upgrade path. If a page is not found in leveldb the flatfile datastore will be consulted.

Participation

We're happy to take issues or pull requests regarding the goals and their implementation within this code.

A wider-ranging conversation is documented in the GitHub ReadMe of the founding project, SFW.

The contributing page provides details of the repositories that form the node.js version of Federated Wiki, together with some guidance for developers.

License

MIT License

More Repositories

1

wiki-server

Federated Wiki client and server in Node.js
CoffeeScript
153
star
2

wiki-client

Federated wiki client-side javascript as a npm module.
JavaScript
115
star
3

wiki-gem

Federated Wiki Server as a Ruby Gem
Ruby
12
star
4

wiki-security-passportjs

Passport based security plug-in for Federated Wiki.
CSS
7
star
5

wiki-plugin-activity

Federated Wiki Plugin - activity
CoffeeScript
5
star
6

wiki-plugin-frame

Federated Wiki - Frame Plugin
JavaScript
4
star
7

wiki-plugin-flagmatic

Offer a choice of new flags for the logged-in site
CoffeeScript
3
star
8

wiki-plugin-reduce

CoffeeScript
3
star
9

wiki-plugin-transport

Federated Wiki Plugin - Transport
CoffeeScript
3
star
10

wiki-security-friends

A minimal security module using shared secrets
CoffeeScript
3
star
11

wiki-plugin-markdown

Format text using paragraph oriented features of markdown
CoffeeScript
3
star
12

wiki-plugin-map

Federated Wiki - Map Plugin
CoffeeScript
3
star
13

wiki-ssg

Wiki Static Site Generator
JavaScript
2
star
14

wiki-plugin-video

Embed Video from YouTube or Vimeo
CoffeeScript
2
star
15

wiki-plugin-txtzyme

Txtzyme connects wiki pages to things on the internet.
CoffeeScript
2
star
16

wiki-plugin-html

Format text with sanitized html tags.
JavaScript
2
star
17

wiki-plugin-plugmatic

Administer Installed Plugins
JavaScript
2
star
18

wiki-plugin-pushpin

Federated Wiki - Push Pin Plugin
JavaScript
2
star
19

wiki-plugin-future

JavaScript
1
star
20

wiki-plugin-assets

File list interface to wiki assets
CoffeeScript
1
star
21

wiki-plugin-report

Federated Wiki - Report Plugin
CoffeeScript
1
star
22

wiki-plugin-parse

Federated Wiki - Parse Plugin
CoffeeScript
1
star
23

wiki-plugin-calculator

CoffeeScript
1
star
24

wiki-plugin-data

Federated Wiki - Data Plugin
CoffeeScript
1
star
25

wiki-plugin-linkmap

Federated Wiki Plugin - linkmap
CoffeeScript
1
star
26

wiki-plugin-rollup

Federated Wiki - Rollup Plugin
CoffeeScript
1
star
27

wiki-plugin-federatedwiki

Federated Wiki - FederatedWiki Plugin
CoffeeScript
1
star
28

wiki-plugin-reference

Federated Wiki - Reference Plugin
JavaScript
1
star
29

wiki-plugin-metabolism

CoffeeScript
1
star
30

wiki-plugin-factory

JavaScript
1
star
31

wiki-plugin-changes

Federated Wiki - Changes Plugin
CoffeeScript
1
star
32

wiki-plugin-grep

Search all site pages with schema specific markup and regular expressions.
CoffeeScript
1
star
33

wiki-plugin-journalmatic

A set of tools for checking and helping resolve page problems
HTML
1
star