lytlang/test/fixtures/example_projects/simple_app/app.lyt
Daniel Flanagan afc0738a31 WIP STUFF
2019-11-15 00:51:27 -06:00

28 lines
567 B
Text

!project SimpleApp simple_app
# should generate a SimpleApp.MixProject_ module
version: "0.1.0"
elixir: "~> 1.8"
lytl: "~> 0.1"
start_permanent: Mix.env() == prod
extra_applications: [logger]
deps: []
!module
# uses project's name as module if not module name specified
import Plug.Conn
init = opts -> IO.puts "initializing plug"; opts
call = conn _options = [] ->
IO.puts "calling plug"
conn
|> put_resp_content_type "text/plain"
|> send_resp 200 "Hello world"
long_fn =
arg1
arg2
arg3
->
# in lytx run `Plug.Adapters.Cowboy.http SimpleApp []`