1

I have a simple web server in Node.JS/Express.

I would like to somehow dispach all requests for a statis HTML content to another instance of Express web server (running on the same machine). The idea is to release the main server ASAP for new requests and leave the handling of all static content to this second instance.

Is it posible that the second instance return the static content to the directly to the caller? I mean withount passing it back to the main server?

1 Answer 1

2

This could easily be handled by having a reverse proxy which redirects all requests for URL's with a /static (for example) prefix to one server, and all other URL's to your node.js server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.