Nowadays web applications are fat. I mean they consist of a lot of technologies. And you need to know a lot of technologies to write modern apps. But I’m lazy guy, I don’t want to learn all of this stuff.

In this series of articles I will write modern full stack JavaScript web application using as less of technologies as possible.

I’m not sure about the idea of the future application, but it does not matter right now, let’s just start:

It turns out that start Node.js server is pretty simple. I don’t even need a framework for doing this:

server.js

Then I enter node server.js and server runs at localhost:4000 .

What about routing? Our app is going to have several pages. Easy peasy:

server.js

Ok, let’s create something real now. I like the idea of components. Components get some data and render this data into html. I will write components as functions:

Now we have two components, App and Header . App renders whole application and Header renders menu. OMG, they look like React stateless components!

Well, so far everything was super simple. Now I will add some styles to the application, create styles.css :

styles.css

Then I want our App to load styles.css , so I add <link /> :

But how do I make styles.css file be available at /styles.css path? Probably I need manually read this file and send all it’s content:

But wait, every request to /styles.css will force out server to read from hard drive. Not very efficient. What if we will cache the content?

Phaha! I like the way I rule my application. I feel like a God whilst with express or any other framework I only felt like a king.

Here is our app in action:

Now we have a basis for developing old-fashioned server-side applications with static content. No framework is needed, Node.js does the job.

Next I will add client side JavaScript to bring some dynamics. Read PART 2 to see how.