I have been looking in various posts, but cant seem to find if its possible or not to actually run node/express server and the client server (react app) at the same time when we do serve -s
on a built app?
I know there are many libraries which can run many commands in a sequence from the package, but that would be for dev environment. But since I have the server together with the actual app, the server of course does not start when I write serve -s
. Just starts the app and thats all.
Is there a way to start both server and the app with serve -s
? Or the only solution is to make server and the app as 2 separate projects and start them separatelly?
EDIT: Just to clarify, as I have noticed some people suggesting serving the page via express. I have the app for the raspberry pi project and I need the node server to control the raspberry gpio and shell commands.