Skip to content

Instantly share code, notes, and snippets.

@d0rc
Created January 27, 2014 21:56
Show Gist options
  • Select an option

  • Save d0rc/8658176 to your computer and use it in GitHub Desktop.

Select an option

Save d0rc/8658176 to your computer and use it in GitHub Desktop.
defmodule Standalone.Mixfile do
use Mix.Project
def project do
[ app: :standalone,
version: "0.0.1",
elixir: "~> 0.12.3-dev",
escript_main_module: Standalone.Main,
deps: deps ]
end
# Configuration for the OTP application
def application do
[
mod: { Standalone, [] },
applications: [:httpoison]
]
end
# Returns the list of dependencies in the format:
# { :foobar, git: "https://github.com/elixir-lang/foobar.git", tag: "0.1" }
#
# To specify particular versions, regardless of the tag, do:
# { :barbat, "~> 0.1", github: "elixir-lang/barbat" }
defp deps do
[
{:httpoison, github: "edgurgel/httpoison"}
]
end
end
defmodule Standalone do
use Application.Behaviour
# See http://elixir-lang.org/docs/stable/Application.Behaviour.html
# for more information on OTP Applications
def start(_type, _args) do
Standalone.Supervisor.start_link
end
end
defmodule Standalone.Main do
def main(_) do
IO.puts "#{inspect HTTPoison.get "google.com/"}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment