Home > Software design >  How to Launch React Application using post request from another website/server
How to Launch React Application using post request from another website/server

Time:11-26

My react app won't be public, It will be called by some other application(rails application with redirect_to) that is written in another programming language(ruby on rails).

To launch my react app, I want post requests to be used and they will redirect to my react application.

That's by I added a simple HTML form that will send a post request to my react app. Finally, the user will be redirected to my react application.

The reason I am going to use the post method is I can use get because it will contain tokens and other useful information which should not be in the get method URL.

Thanks in advance, Please suggest here...!

I am trying to find a way that will load the react application and provide sensitive information like token in safer way(not in URL)

CodePudding user response:

Build react application it will give you index.html and static files. Add that index.html file and static files to your application. Configure pathes inside index.html file to static files as assets, CSS etc. You can load index.html in your application this will be react app inside your application.

CodePudding user response:

use body-parser for if you don't want to pass data using url.

  • Related