RESTBase/Installation

Download RESTbase source
You can do this operation from any folder where you have permissions.

Download from git:

Alternatively, download the zip from the project repository and extract it.

From the restbase project directory, install the Node dependencies using npm (part of nodejs):

Configuration
Edit the config.yaml file in these parts: is the location of your wiki's api.php. For example, MediaWiki's API endpoint is mediawiki.org/w/api.php. See The endpoint.

is the base URL of your wiki. For example, MediaWiki's base URL is mediawiki.org.

in the  and   entries must correspond to the URL and port of your Parsoid server. If your Parsoid and RESTBase servers are on the same machine, then  is a valid URL.

Run the server and Test
To run the RESTBase server use the same procedure to run the cxserver.

For testing execute: You should see the HTML content of the Main_Page.

In a browser you can also test by navigating to http://YOUR_RESTBASE_SERVER:7231/YOUR_WIKI_WEBSITE/v1/ and you should see a page titled Wikimedia REST API. On this page you can test all manner of RESTBase methods and variables.

For other testing refer to github.

If Restbase Port is blocked
If you do not see the page, your restbase server port may be blocked. Do the following:
 * If you get, your restbase server port is ok.
 * If you did not get, then do:
 * If you get  the restbase server is not bad, but you cannot access the port.

To bypass the block, you can set proxypass to your Apache httpd configuration. if you use apache, you can make a  file like this, and put on   of YOUR_RESTBASE_SERVER.

You should restart httpd (by  or some means). now In a browser you can navigate to http://YOUR_RESTBASE_SERVER/YOUR_WIKI_WEBSITE/v1/ and you should see a page titled Wikimedia REST API. And in this setting, you should add below to  for VisualEditor.

Starting RESTBase Server automatically
For installing the RESTBase server as a service with systemd, create this file in the   directory (  for CentOS 7 and   for openSUSE) and name it.

Replace  with the path to your restbase project directory.

To automatically start the RESTBase server at system startup, To control the RESTBase server,

If you ever change the  script, you need to reload it with,