简体   繁体   中英

Electron express server in cluster mode

I want to create a desktop application using electron framework.

Application will be having a front-end using react and back-end using express and mysql .

So my basic query is

  1. What is better approach both back-end and front-end in one application or as a different application.
  2. How to run back-end express server in cluster if both front-end back-end in one application.
  1. I am developing an app as yours. What I did is created a directory with two sub directories one for the front end and the next for the back end. Working with react, you have to identify your components, and the shape of your store and state. I build the front end before the back end, it is just my preference and I find it more approachable.
  2. You front end and back end is not one application. Your front end will make API calls to the back end server (express). Your server can run in cluster without problem. As node.js api is available in electron's api, clustering should also work on the "front end".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM