Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.17 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.17 KB

Sidecar CI

Sidecar makes it easy to run sidecar processes alongside your main application. This is especially useful in development when you may want to spin up a process like npm run dev or an ngrok proxy.

Installation

If available in Hex, the package can be installed by adding sidecar to your list of dependencies in mix.exs:

def deps do
  [
    {:sidecar, "~> 0.5.0"}
  ]
end

Configuration

First, configure your sidecar processes:

config :sidecar, processes: [
  ngrok: "ngrok http 4000",
  npm: "npm run dev"
]

Then, add the Sidecar supervisor to your application's supervision tree:

def start(_type, _args) do
  children = [
    # ...etc.
    Sidecar.Supervisor
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/sidecar.