E
E
Erik Mikoyan2020-08-17 08:13:50
JavaScript
Erik Mikoyan, 2020-08-17 08:13:50

Do I need to somehow compile the server file?

I have a front, written in react, compiled into a build. Do I need to somehow translate/compile the server so that it is in one file and put it in this build? Or how to properly arrange all this for uploading to a virtual server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-08-17
@Robur

no need, server files separately, front files separately.
You can put it just next to it so that the back gives the front as static, but it will still be separate files.
you don’t need to collect the bundle on the back, the main thing is that the node understands what you give it.
how to "design for filling" - a lot of options.
the simplest - compile the front, put it somewhere in the server files so that it gives them to the browser (depending on your backend server) and upload it to the server in any way possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question