https://github.com/jclem/sidecar
Sidecar processes for Elixir applications
https://github.com/jclem/sidecar
Last synced: about 1 year ago
JSON representation
Sidecar processes for Elixir applications
- Host: GitHub
- URL: https://github.com/jclem/sidecar
- Owner: jclem
- License: mit
- Created: 2020-08-17T16:13:41.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-08-18T11:31:19.000Z (almost 6 years ago)
- Last Synced: 2025-06-12T03:08:04.978Z (about 1 year ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/sidecar
- Size: 32.2 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Sidecar [](https://github.com/jclem/sidecar/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
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](https://ngrok.io) proxy.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `sidecar` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:sidecar, "~> 0.5.0"}
]
end
```
## Configuration
First, configure your sidecar processes:
```elixir
config :sidecar, processes: [
ngrok: "ngrok http 4000",
npm: "npm run dev"
]
```
Then, add the Sidecar supervisor to your application's supervision tree:
```elixir
def start(_type, _args) do
children = [
# ...etc.
Sidecar.Supervisor
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/sidecar](https://hexdocs.pm/sidecar).