1

I am just beginner, so my question/architecture could be silly. Please correct me if it is. I need to write an application, that:

  1. Delivers static content (index.html, css, client scripts and images, is handled via nginx only)
  2. Handles jsonrpc api requests (nginx proxies all requests to node.js server)
  3. Handles socket.io connections (i don't see any reason to proxy them via nginx, so i think it should be provided direct connection to node.js application)

Is this possible? So all static requests and jsonrpc are handled using nginx (and node.js as backend in second case), and socket.io connetions on different port without nginx?

1 Answer 1

1

Yes - I have developed a couple of node apps with this kind of architecture. In my case I'm substituting Apache for nginx but it's otherwise the same setup you're describing.

The only real gotchas are if you try to use things like Express and templating engines - then you just have to be aware of what you're using in the templates (in node) vs what you're treating as static content.

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.