What to do mediation server?

Good day!
I want to make a website in nodejs. Don't scold for choice, guided by the principle: "Do what you can!".

I have a database of files on another server. And need links to my domain
Using NodeJs I know how to do it, but as you know it is not ideal for a direct impact of statics.

Example:
There is a link: https://goo.gl/31mvYU
Here are examples of links that I would like to get
1)http://мой-домен/download/31mvYU
or
2)http://мой-домен/download?code=31mvYU
or
3)http://мой-домен/download?code=https://goo.gl/31mvYU
Please tell me which technology is better to use for this approach?
July 2nd 19 at 13:22
2 answers
July 2nd 19 at 13:24
Solution
use nginx
on node.js configure reverse proxy
if the url is dynamic, read about the response headers from the backend for the return of a statics of nginx after the request is processed by the backend (node.js)

PS
but as you know it is not ideal for the direct impact of static
I have on the server node sticking out and gives static, while doing it faster with nginx and eats less memory, it all depends on the hands of the programmer
July 2nd 19 at 13:26
Solution
On the contrary, node.js perfectly located for the issuance of statics, especially with another resource.
Use network streams in order to not overload RAM and everything will be fine.

https://makeomatic.ru/blog/2016/08/22/Streams_handbook/

Find more questions by tags Web DevelopmentProgrammingNode.jsUbuntuUbuntu Server