Great walkthrough of using Plug, Cowboy and Poison altogether! I've actually recently wrote a deep-dive on Plug.Cowboy to understand a bit more how Cowboy handled incoming HTTP requests, which I found super interesting: charta.dev/tours/plug_cowboy
I'm a dev with a strong *NIX sysadmin background. I've been programming for 20+ years, started with IRC scripts, C, Python, PHP, Ruby/Rails, Node/JS, Go and Elxir. Full time on Ruby,Elixir and Rust.
Very interesting stuff! I use Phoenix and I did know that its router is a set of macros for the Endpoint. This minimal implementation is very cool and useful to know :-)
On a side note: have you tried Jason instead of Poison? I've started using it, pretty the same API of Poison, also, if I recall correctly, it's the default encoder for Ecto 3.x.
mix run --no-halt is what you need. Would recommend postman though rather than a browser otherwise, you get a load of warnings in the logger about favicons.
Education enthusiast. Ex Groupon Merchant Engineering, Engineering and Growth at Verbling (YC'11) and cram school founder in Taiwan.
Currently building Alchemist Camp.
Great walkthrough of using Plug, Cowboy and Poison altogether! I've actually recently wrote a deep-dive on Plug.Cowboy to understand a bit more how Cowboy handled incoming HTTP requests, which I found super interesting: charta.dev/tours/plug_cowboy
Awesome stuff!
thank you for throwing in the link here ... was really looking for something of sorts
Very interesting stuff! I use Phoenix and I did know that its router is a set of macros for the Endpoint. This minimal implementation is very cool and useful to know :-)
On a side note: have you tried Jason instead of Poison? I've started using it, pretty the same API of Poison, also, if I recall correctly, it's the default encoder for Ecto 3.x.
Curious to see the deployment part.
Thanks for the article, looking forward to the followup on deployment!
Thanks for reading! Yeah, I will be walking through a few methods of deployment:
Thanks :) Just ran my first Elixir endpoint
To try it, just use
iex -S mixand go to your favorite browser :)mix rundoesn't work but I'll figure it out !mix run --no-haltis what you need. Would recommend postman though rather than a browser otherwise, you get a load of warnings in the logger about favicons.Thank you so much for this. It's exactly what I needed.
Very interesting article! I was wondering if you know how to add support for CORS. That would add the cherry the cake!
Thank you for this! Would really like to see a quick tutorial on deploying as well!
hey, nice and useful. would be curious about how you deploy also!
Fun!
🙌