B
B
BestJS2016-11-29 04:49:32
Programming
BestJS, 2016-11-29 04:49:32

With what help to make an intermediary server?

Good day!
I want to make a website with nodejs. Do not scold for the choice, guided by the principle: "Do what you can!".
I have a certain database of files on another server. And I need links to my domain
Using NodeJs, I know how to do it, but as you know, it is not ideal for serving statics.
Example:
There is a link: https://goo.gl/ 31mvYU
Here are examples of links that I would like to receive
1) http://my-domain/download/ 31mvYU
or
2) http://my-domain/download?code= 31mvYU
or
3) http://my-domain/download?code=https://goo.gl/31mvYU
Can you please tell me which technology is better to use for this approach?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2016-11-29
@BestJS

use nginx
on node.js set reverse proxy
if url is dynamic, read about response headers from backend to return statics by nginx after processing request by backend (node.js)
PS

but as you know, it is not directly ideal for returning static
On my server, the node sticks out and gives static, moreover, it makes it faster than nginx and eats less memory, it all depends on the hands of the programmer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question