Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Endpoints_Phoenix.pdf
Search
Moroni
April 07, 2021
Technology
0
37
Endpoints_Phoenix.pdf
Moroni
April 07, 2021
Tweet
Share
More Decks by Moroni
See All by Moroni
Inicialização de Aplicações Elixir
moronisauner
0
27
Other Decks in Technology
See All in Technology
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
TypeScript、上達の瞬間
sadnessojisan
46
13k
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
670
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
520
39k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
For a Future-Friendly Web
brad_frost
175
9.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
GraphQLとの向き合い方2022年版
quramy
43
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
RailsConf 2023
tenderlove
29
900
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Transcript
Endpoints Phoenix O caminho por onde todas requisições passam
github.com/moronisauner
Vamos ao que interessa
Phoenix e Plug • O Phoenix foi construído em cima
do Plug • Inclusive o Plug está presente em toda a parte • O Phoenix fornece ferramentas excelentes para trabalhar com o Plug ◦ Endpoint ◦ Router ◦ Controllers • Só os Channels e Sockets que são um pouco diferentes
Como que funciona?
Plug
Plug.Conn
Endpoint
Router
Controller
Deveres do Endpoint • Coloca toda manipulação do Plug.Conn numa
árvore de supervisão • Define um pipeline inicial para todas as requests • Guarda algumas configurações • Qualquer coisa além são os plugs que fazem
O que é comum encontrar no Endpoint • CORS e
CSRF • Autenticação • Validação de Token (ex: Guardian) • Coleta de Métricas • Plugs de plataformas de monitoramento (ex: DataDog e NewRelic)
Vale comentar
None
None