Native Installation

Installation Backend

The installation of the backend is straight forward, at the moment only available from source. Clone the GitLab repository onto your server and install the requirements for the backend implementation.

How to install the required packages is described in this section

Getting the Source

Clone the GitLab repository

Using https:

git clone https://gitlab.ti.bfh.ch/muscle/backend.git

Using ssh:

git clone git@gitlab.ti.bfh.ch:muscle/backend.git

Installation

After successfully cloning the repository, change into the source directory and install the dependencies

Configuration Backend

The backend configuration is done via environment variables. The easiest way to configure the application is to place a file called .muscleenv in the top level backend directory.

Inside this file you can export the configurations which you need.

Serve the Backend

Note

Make sure the dependecies are installed before starting here

Its recommended to use a server application to serve the backend API. How to finally serve the backend over the ethernet, read the description in section webservers.

Installation Frontend

The frontend installation can be done by downloading the compiled application from GitLab. It must then be deployed via a server.

Configuration Frontend

The web application supports different optional configurations. To enable those configurations, copy the file application.config.json.tpl inside the downloaded directory at config/ to config/application.config.json.

If config/application.config.json does not exist, the default configuration is taken, which assumes that the frontend is served over the same server as the backend. All options inside the file are optional, only the configured values are used, others will stay at their default.

The file provides the following structure:

{
  "server": {},
}

server

Backend configuration with the following options:

name

The server URL. If the server uses a port then the port must also be specified here. If this value is omitted the backend is assumed over the same URL and port as the frontend.

protocol

The protocol to use to call the server. If this value is omitted the backend is assumed via the same protocol as the frontend.

timeout

The timeout for backend responses, defaults to 1 second.

Example

An example configuration may look like this:

{
  "server": {
    "name": "localhost:8080",
    "protocol": "http",
    "timeout": 1000
  }
}

Serve the Frontend

To serve the frontend there is a need for a proper server. How to finally serve the frontend over the ethernet, read the description in section webservers.

Webservers

Both applications listed above need to be served by a server. Its recommended to serve both instances by the same server. However, it is also possible to serve them separately on different servers.

These are the currently supported servers, however, you may choose another one which fits you more.