I went through various blog articles to find out how a full-blown application can be modeled and developed using React, Redux (running on the interface) with API endpoints that communicate with the ExpressJS server.
As far as I know, we need to have:
and). One application expressJSdeveloped with all possible endpoints (available to access the API). This application should work on a port, for example. 7070. This server-side application will interact with the database. b) Develop an application React, Reduxthe external interface, and run the application on a different port, for example. 8080 using servers webpack, gulpor grunt.
I am sure that this is not the only model. Or maybe my concept is a little weak. But this post will clarify the concepts globally for all Frontend + fullstack developers. Please write your recommendations and expert opinions on the following issues:
Is my specific model correct?
ExpressJS ReactJS ( React ).
/* a reference example of using root route handler in Express to throw an
index file (which includes bundle.js react application), this works okay,
but can not handle or render React Routes on client side; and instead
if a menu link clicked that sends request to Express but Express
application file only had '/' route to handle.
*/
app.get("/", function(req, res){
res.sendFile(dirname + "index.html"); // but this is not viable
})
№2 , ? Express- API. , ; React ( ExpressJS).
: + Redux + Express + DB (mongoDb, Redis, MySql Postgres ..)
- /
( ). , NodeJS-. : Heroku, AWS, RedHat OpenShift, Nodejitsu, Microsoft Azure, , Firebase ..
, - .
- ( )
). Linux ( ) + SSL + + NodeJS + IP-
II). Windows + SSL + + NodeJS + IP
- ? , .
, . .
. ( , ). , .