Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Marcio Mello
Marcio Mello
7,861 Points

Web Server x Application Server with Nodejs and Express

Hello all,

I am very new in the web programming scenario and have a lot of questions.

I started learning with Front-End development where we learn to create simple static web pages. When working with these, we just have to upload out files to a HOST plataform and forward our domain address to it. Our HOST server will perform the HTTP request and response for us. (Did I get this right?)

Now, learning NODEJS and EXPRESS in order to make more elaborated apps, I learned that NODEJS/EXPRESS also provides a WEB SERVER to deal with HTTP req/res. In this case, we are ditching the HOST SERVER out? Now I have to personaly program how my website will serve STATIC files also?

Before beggining all this I was under the impression that NODEJS would only deal with the "APP LOGIC" as an "Application Server" and let the STATIC FILES feed with the HOST SERVER. Was I wrong?

Question 2: If I let the dynamic template to be performed in the front end with React/Angular, do I need to use Template middleware on the backend / web server? In my head, I was planning to use nodejs just to gather information from other APIs and package it in JSON format, serving the browser with this data and letting my FRONT END framework render the webpage.

Could someone help me create this mental model in my head?