Closed rrevanth closed 5 years ago
If you could show me an example of what you want to see, then I can probably help you more.
I am trying to create a phoenix app with both api routes and web app routes.
like for a post resource . I will have
/api/posts/(new|edit|show|index) /posts/(new|edit|show|index)
routes and would like to authenticate both api and web routes.
Is it possible to use openmaize for both routes at the same time
I'll look into it.
Thank you! :)
Sorry this has taken so long, but I've been really busy. It was wondering how you could do this with the Phoenix generators, but it seems like they don't accommodate this situation. One problem I see is how you are going to organize the different view and controller files. Could you give me more information about how you would do this? Maybe it would be a good idea to ask a question on elixirforum.com about how other people organize their apps with both html and api routes.
No worries. I for one am will use generators to get the basic template and move the api controllers,views and everything to api in their respective folders with proper namespacing like
/controllers - html /api/controllers - api /views - html /api/views - api
like this.
If it's an umbrella, we can have api as a entirely separate app and core as another which both depends on
umbrella/
But I also thing elixirforum is best place to ask this :
There is already a question about umbrella there 👍 😄
Currently the --api command will only create api authentication whereas without it would be used in html site authentication.
Is there a way to create both api authentication files as well as auth for using in site!