Development Environment

To work with Moera, you need four components. You don’t need to build and install all of them - you may use those that are publicly available, until you plan to make changes to the code. These components are:

  1. Naming service. By default, naming.moera.org is used. For development, build and run moera-naming (see README.md for details).
  2. Node. You may get one from moera.blog provider. For development, build and run moera-node (see README.md for details).
  3. Client. If you have the browser extension installed (see below), it uses the client at client.moera.org by default. Without the browser extension you can use web.moera.org standalone client. For development, build and run moera-client-react (see README.md for details).
  4. (Optional) Browser extension. Install from the Firefox or Chrome store. For development, build and install moera-browser-extension (see README.md for details).

Naming service and node use moera-commons package. By default, it is downloaded from GitHub Maven repository, but you can build and install it, if you need to modify it (see README.md for details).

For local installation of naming and node servers you need to have Java 11+ and PostgreSQL 9.6+ installed. In all major Linux distributions you can install them from the main package repository. For development purposes, you can use one PostgreSQL instance for both node and naming servers.

If you install several components on the same host, note to choose different port numbers for them. By default, they are 8080, 8081 and 3000 for naming, node and client respectively.

Note about HTTPS

If a page is served over HTTPS, modern browsers do not allow it to fetch unencrypted content by HTTP (see mixed active content). Since we strongly recommend Moera nodes to serve all content over HTTPS, the client code must also be served over HTTPS, otherwise browser will not allow it to be injected into the page. It is also not possible to access a naming server by HTTP and to connect to home node by HTTP.

You need to take this into account when building a development environment. If you run a development server that serves moera-client-react over HTTP, you will not be able to open HTTPS nodes with it. Using a local HTTP node for development will solve the problem.