Created
June 7, 2016 01:01
-
-
Save bryanjos/b267c2c64447a009116ead2e94c22d29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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