Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elixir #371

Open
wdiechmann opened this issue Mar 17, 2017 · 1 comment
Open

Elixir #371

wdiechmann opened this issue Mar 17, 2017 · 1 comment

Comments

@wdiechmann
Copy link

May I suggest .ex and .exs providing support for Elixir?

# ./lib/taskrr/repo.ex
defmodule Taskrr.Repo do
  use Ecto.Repo, otp_app: :taskrr

  @doc """
  Dynamically loads the repository url from the
  DATABASE_URL environment variable.
  """
  def init(_, opts) do
    {:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
  end
end

# ./mix.exs
defmodule Taskrr.Mixfile do
  use Mix.Project

  def project do
    [app: :taskrr,
     version: "0.0.1",
     elixir: "~> 1.4",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix, :gettext] ++ Mix.compilers,
     start_permanent: Mix.env == :prod,
     aliases: aliases(),
     deps: deps()]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [mod: {Taskrr.Application, []},
     extra_applications: [:logger, :runtime_tools]]
  end
end
@jashkenas
Copy link
Owner

Go right ahead and send in a pull request that adds it, and I'll be more than happy to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants