A simple Plug-based web app in Elixir.
To create a new copy of this app, use Exgen:
$ mix exgen.new new_dir \
-t https://github.com/rwdaigle/exgen-plug-simple.git \
--app-name my_app --module MyApp
Once the app has been generated w/ Exgen, install its dependencies:
$ mix deps.get
Then start the app using iex:
$ iex -S mix
iex(1)>
Load localhost:4000 in your browser. You will see the basic text-response defined for the root path:
Hello there!
To begin adding your own endpoints, open lib/<%= app_name %>/router.ex
and start defining simple paths:
get "/status" do
conn
|> put_resp_content_type("text/html")
|> send_resp(200, "OK")
end