Answer the question
In order to leave comments, you need to log in
How to correctly form the Node.js RestApi structure?
There are two applications on the same server running on different
api ports - on 3000
front - on 8080
How to implement the logic of working with files correctly? That is, if there is a function, for example, upload, then the picture is saved in the api in the public folder, how to get it on the front?
Answer the question
In order to leave comments, you need to log in
You can not fool around and file proxying through nginx
You will get something like
location /api/ -> proxy_pass 127.0.0.1:3000
location / -> proxy_pass 127.0.0.1:8080
and then through document_root allow you to look where you need to
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question