Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m trying to get some pointers on what the best methodology to follow for a we

ID: 647245 • Letter: I

Question

I'm trying to get some pointers on what the best methodology to follow for a web application would be.

First, some background: I've built two different APIs using Node.js where Node serves the data to clients using a JSON interface. The clients have both been iOS applications, making heavy use of Socket.io and Express.

Now, I'm trying to get into the world of website development- I'd like to be able to create a single-page application that is run in the browser, again using Socket.io and Express. However, I'm hung up a bit on what exactly I should do.

Should I host my site out of Nginx/Apache and use Node as simply a "data" server, funneling data through JavaScript on the client to update the site HTML?
Should I host it all through Node, adding routes for files as I go?
Should I attempt to create some form of "send a command via Socket.io to the client JS to build the page dynamically" type of framework?
Should I do something else entirely? Basically, I'm an iOS and API developer unused to web technologies overall, trying to figure out how best to use what I know about Node's data serving methodology and apply it to a client side web app.
I've been reading tons of information online and, while helpful, it seems that everything seems to assume that I know a lot about web development already and am just trying to adapt it to Node, whereas instead the opposite is true: I know about Node but not about web development. I've looked into the MEAN stack, for example, and while I love the concept it doesn't appear (at first blush) that Angular is any more suited to Node than, say, jQuery (I'm sure I'm wrong here- there must be some reason 'MEAN' is a thing).

Any input is greatly appreciated!

Explanation / Answer

Should I host my site out of Nginx/Apache and use Node as simply a "data" server, funneling data through JavaScript on the client to update the site HTML?

Many people recommend this exactly. This article is about yesod, but I think it applies:

As fast as Warp is, it is still optimized as an application server, not a static file server.
Using Nginx, you can set up virtual hosting to serve your static contents from a separate domain. (It