Packages

Trex is a key value store implementing a subset of Redis protocol, designed to be suitable as a Rails I18n backend.

Current section

Files

Jump to
trex lib trex.ex
Raw

lib/trex.ex

defmodule Trex do
@moduledoc """
The main entry point of Trex server.
There's one Trex.Server process worker and one Task supervisor being
started here. Server process accepts TCP connections and uses
separate tasks to handle them.
"""
require Logger
def start(_type, _args) do
import Supervisor.Spec
children = [
supervisor(Task.Supervisor, [[name: Trex.Server.TaskSupervisor]]),
worker(Trex.Server, [])
]
Supervisor.start_link(children, strategy: :one_for_one)
end
end