Skip to content

Instantly share code, notes, and snippets.

@bryanjos
Created June 7, 2016 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanjos/b267c2c64447a009116ead2e94c22d29 to your computer and use it in GitHub Desktop.
Save bryanjos/b267c2c64447a009116ead2e94c22d29 to your computer and use it in GitHub Desktop.
defmodule ViewService do
defstruct [:locahost, :port]
def init(host, port) do
%ViewService{localhost: localhost, port: port}
end
def render_view(view_service, route, data) do
# ...
end
end
ViewService.init("localhost",8888)
|> ViewService.render_view("home/index", %{title: "Hi, Brian"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment