dwyl / learn-phoenix

:fire: Phoenix is the web framework without compromise on speed, reliability or maintainability! Don't settle for less. :rocket:
649 stars 45 forks source link

Add documentation on how to create an API server #133

Closed SimonLab closed 4 years ago

SimonLab commented 4 years ago

ref: #132 Adding instruction on how to create an API server with Phoenix

nelsonic commented 4 years ago

@SimonLab I'm trying to follow this guide now, but cannot find the code ... 🤷 Did you push the end state of your example App to GitHub? (I tried checking your repos ...)

SimonLab commented 4 years ago

I've mostly tested how to create an API only application with https://github.com/dwyl/app-api/ The router doesn't have any :browser pipeline and only use the :api one: https://github.com/dwyl/app-api/blob/master/lib/app_api_web/router.ex

There is also a CORS configuration on the endpoint.ex file: https://github.com/dwyl/app-api/blob/d077e3a42b0e99273fd1650560ef102faa161ff2/lib/app_api_web/endpoint.ex#L43

nelsonic commented 4 years ago

@SimonLab thanks for clarifying. 👍