This file contains 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 Parser do | |
def numero() do | |
fn | |
<<c::utf8>> <> rest -> | |
case c do | |
c when c in ?0..?9 -> {:ok, c - ?0, rest} | |
_ -> {:error, {:numero, :no_parse, c}, <<c::utf8>> <> rest} | |
end | |
end | |
end |
This file contains 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 MyAppWeb.PageLiveTest do | |
use MyAppWeb.ConnCase | |
import Phoenix.LiveViewTest | |
@tag :tmp_dir | |
test "disconnected and connected render", %{conn: conn, tmp_dir: tmp_dir} do | |
{:ok, page_live, disconnected_html} = live(conn, "/") | |
assert disconnected_html =~ "Welcome to Phoenix!" |
This file contains 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
FROM elixir:alpine | |
WORKDIR /app | |
ARG USER_UID | |
ARG UNAME | |
EXPOSE 4000 | |
RUN apk add --no-cache curl bash | |
RUN curl --url https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh --output /wait-for-it.sh | |
COPY ./docker/entrypoint.sh /entrypoint.sh | |
RUN chmod +x /entrypoint.sh |
NewerOlder