Is it good to serve static files in the Rails shared folder?

I have a one-page front-end application written in AngularJS and I want to use Rails to create an internal API.

I wonder if it's worth adding all the interface files to the Rails' folder publicand mounting all the Rails API routes on api/xxxx. Thus, I can save the efforts of developers, so they do not need to run two servers during development (external server server and server rails). In addition, I do not need to worry about the Rails asset pipeline. I can use a completely clean solution to optimize fron-tend application. All I have to do is just put them in one application.

Is there a drawback to this design?

+4
source share
1 answer

Yes, that's great. In fact, this is what it does rake assets:precompile.

0
source

All Articles