0
Hello, I am developing a common system with ROR and it has a structure not only of an API, as it has its views and everything else.
The point is that I will also build an API to serve it to a mobile app and when I search on the subject I only find people explaining how to build an application only as an api through the parameter:
rails new [my-app] --api
But this way the application needs different configurations and is much leaner than the normal application. I would like to use the following approach, follow a normal application and create a group of routes to serve the API, with authentication and everything.
How do I do that?
Hello my friend, thank you, I will test this
– Alessandro Sales
Just an addendum, when I put for example API::Greetingscontroller there was an error stating that there was no such method, I had to replace it to Api::Greetingscontroller
– Alessandro Sales