-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from DiodonHystrix/maintenance/add-formatter
Add formatter
- Loading branch information
Showing
42 changed files
with
365 additions
and
231 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["{mix,.formatter}.exs", "{config,lib,test,web}/**/*.{ex,exs}"] | ||
] |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,50 @@ | ||
defmodule VerkWeb.Endpoint do | ||
use Phoenix.Endpoint, otp_app: :verk_web | ||
|
||
socket "/socket", VerkWeb.UserSocket | ||
socket("/socket", VerkWeb.UserSocket) | ||
|
||
# Serve at "/" the static files from "priv/static" directory. | ||
# | ||
# You should set gzip to true if you are running phoenix.digest | ||
# when deploying your static files in production. | ||
plug Plug.Static, | ||
at: "/", from: :verk_web, gzip: false, | ||
plug(Plug.Static, | ||
at: "/", | ||
from: :verk_web, | ||
gzip: false, | ||
only: ~w(css fonts images js favicon.ico robots.txt) | ||
) | ||
|
||
# Code reloading can be explicitly enabled under the | ||
# :code_reloader configuration of your endpoint. | ||
if code_reloading? do | ||
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket | ||
plug Phoenix.LiveReloader | ||
plug Phoenix.CodeReloader | ||
socket("/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket) | ||
plug(Phoenix.LiveReloader) | ||
plug(Phoenix.CodeReloader) | ||
end | ||
|
||
plug Plug.RequestId | ||
plug Plug.Logger | ||
plug(Plug.RequestId) | ||
plug(Plug.Logger) | ||
|
||
plug Plug.Parsers, | ||
plug(Plug.Parsers, | ||
parsers: [:urlencoded, :multipart, :json], | ||
pass: ["*/*"], | ||
json_decoder: Jason | ||
) | ||
|
||
plug Plug.MethodOverride | ||
plug Plug.Head | ||
plug(Plug.MethodOverride) | ||
plug(Plug.Head) | ||
|
||
plug Plug.Session, | ||
plug(Plug.Session, | ||
store: :ets, | ||
key: "verk_web_sid", | ||
table: :verk_web_session | ||
) | ||
|
||
auth_options = Application.get_env(:verk_web, :authorization) | ||
|
||
if auth_options do | ||
plug BasicAuth, use_config: {:verk_web, :authorization} | ||
plug(BasicAuth, use_config: {:verk_web, :authorization}) | ||
end | ||
|
||
plug VerkWeb.Router | ||
plug(VerkWeb.Router) | ||
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
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
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
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
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
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
Oops, something went wrong.