I want to know how I can deploy a MEVN stack app to Firebase. The problem is that I use two servers – one for the BE and one for the FE. In my package.json they are configured as follows:
<code> "scripts": {
"dev": "vite",
"backend": "npx nodemon --exec npx babel-node backend/src/server.js",
},
</code>
<code> "scripts": {
"dev": "vite",
"backend": "npx nodemon --exec npx babel-node backend/src/server.js",
},
</code>
"scripts": {
"dev": "vite",
"backend": "npx nodemon --exec npx babel-node backend/src/server.js",
},
The first one runs the FE on port 5173 while the second runs the BE of the app on port 8000. I’ve heard that one of the solutions is to bundle the two servers into one. I would like to know how.
The entire codebase of the project is located at SwiftCart.