There’s been many times when I’ve just wanted to add a simple JSON endpoint to an app to, expose a service, or process webhook events, without the ...
For further actions, you may consider blocking this person and/or reporting abuse
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
thank you for throwing in the link here ... was really looking for something of sorts
Awesome stuff!
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.
Thank you so much for this. It's exactly what I needed.
Thanks :) Just ran my first Elixir endpoint
To try it, just use
iex -S mix
and go to your favorite browser :)mix run
doesn't work but I'll figure it out !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.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:
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!
Very interesting article! I was wondering if you know how to add support for CORS. That would add the cherry the cake!
Fun!
🙌