io7m | single-page | multi-page | epub | Looseleaf User Manual
4. Configuration
Previous
Front Matter
Up
6. Monitoring
Next

# 5. Usage

- 5.1. Overview
- 5.2. Running The Server
- 5.3. Endpoints

## 5.1. Overview

1
This section of the documentation describes the usage of the looseleaf server.

## 5.2. Running The Server

1
Given a correctly defined configuration file in config.json, the server can be started with the following command:

### 5.2.2. Run

    $ looseleaf server --file config.json

3
The looseleaf command does not fork into the background, and is designed to run under process supervision.

## 5.3. Endpoints

1
The looseleaf server exposes a number of HTTP endpoints. For the sake of example, we will assume throughout the rest of this documentation that the server was configured to listen on localhost on port 20000. We will also assume that a user exists with name grouch and password 12345678. The looseleaf server requires basic authentication for all requests except for the root endpoint and the health endpoint. The API versions exposed by the server can be inspected directly:

### 5.3.2. Versions

    $ curl http://localhost:20000
    [{"name":"com.io7m.looseleaf.v1","base":"/v1"}]

3
The above output indicates that the server only supports protocol v1, with all the protocol's endpoints based at http://localhost:20000/v1. Please see the reference pages for the endpoints for precise descriptions of inputs and outputs, and usage examples.
4. Configuration
Previous
Front Matter
Up
6. Monitoring
Next
io7m | single-page | multi-page | epub | Looseleaf User Manual