Configuration details for Rails API-only app with one or two full routes

115 views Asked by At

Let's assume I created a rails app passing the --api flag.

I want one or two routes that are full rails, with extra middleware, that inherit from ActionController::Base to serve the javascript single page application or whatever, etc.

I can presumably put them into a Rails engine and have the rest of the app use the api controllers and less middleware.

What would I need to do to configure a Rails Engine to handle the root route like a full rails app while the main app was api only? Are there alternative configurations that may be worth considering?

0

There are 0 answers