Best way to integrate SPA into ordinary app?

I’m trying to integrate a rails SPA with an ordinary rails app and I’m having routes confusion The rails SPA had everything routed to root path (world#index) I actually wrote it myself, integrating a standalone react video chat app into a rails app for a test, now I wanna bring it into my developed app which is my online site What to do?