Smos

A comprehensive self-management system

The Smos Web Server

You can set up your own Smos Web Server to host your own web interface for smos.

Installation

Front-end

The web server front-end is written in Purescript, so you will need to have a few tools set up. The easiest way to get set up is using nix-shell to get yarn, nodejs, purs and spago:

$ nix-shell
nix-shell $ yarn bundle

Back-end

stack install autoexporter
stack install smos-server

Running

To run the server, run the following command:

$ smos-web-server serve

Reference

Arguments

Usage: smos-web-server COMMAND [--config-file FILEPATH]
  smos-web-server

Available options:
  -h,--help                Show this help text
  --config-file FILEPATH   The config file to use

Available commands:
  serve                    Serve as the web server

Environment

Available environment variables:

  SMOS_SERVER_CONFIG_FILE
                         Config file
  SMOS_SERVER_DATABASE_FILE
                         The file to store the server
                         database in
  SMOS_SERVER_LOG_LEVEL
                         The minimal severity of log
                         messages
  SMOS_SERVER_PORT
                         The port to serve web requests on
  SMOS_SERVER_UUID_FILE
                         The file to store the server uuid in
  SMOS_WEB_SERVER_LOG_LEVEL
                         The minimal severity of log
                         messages
  SMOS_WEB_SERVER_PORT
                         The port to serve web requests on

Configuration

# Configuration
api-log-level: # optional
  # The minimal severity for log messages
  <string>
uuid-file: # optional
  # The file in which to store the server uuid
  <string>
database-file: # optional
  # The file in which to store the database
  <string>
api-port: # optional
  # The port on which to serve api requests
  <number>
web-log-level: # optional
  # The minimal severity for log messages
  <string>
web-port: # optional
  # The port on which to serve web requests
  <number>