Posts
Running a NodeJs app on nginx (1/2)
##Introduction In the previous post we did setup a nginx web server for serving static pages. In this post, we will host a NodeJs application and make sure it will survice application crashes.
##The sample NodeJs application We’ll focus on how nginx handles NodeJs, so we just need a dummy app but we want that the app logs both normal and failure behavior. So, let’s create a NodeJs application under /usr/share/nginx/app1.
Posts
Adopting a lean web app server infrastructure based on nginx (part 3/3)
##Introduction In this post, we’ll create two types of static sites:
in a sub domain : e.g. demosite1.opinionatedapps.com in a sub folder: e.g. demosite1.opinionatedapps.com/sub1 ##Create a static site in a sub domain First let’s go to our DNS (in my case NameCheap.com) and add a new sub domain called ‘demosite1’: Let’s create a config file for this sub domain site in /etc/nginx/sites-available:
When doing a change to a nginx config file, you need to do a reload:
Posts
Adopting a lean web app server infrastructure based on nginx (part 2/3)
##Enjoy the mechanical sympathy of nginx? For me, the most important aspect for selecting nginx (pronounce Engine-X) is the fact that it basically uses an event-driven architecture for handling request in an asynchronous matter, much like nodeJs is working. In other words, it doesn’t rely on threads to handle requests. Since we’ll jump soon on the nodeJs bandwagon, you’ll start to like this type of mechanical sympathy. All this makes nginx very lightweight and super fast.
Posts
Adopting a lean web app server infrastructure based on nginx (part 1/3)
##Introduction Modern web applications build with isomorphic JavaScript frameworks (JavaScript both on client and server) can be easily deployed to web servers other than Microsoft’s IIS. In fact, there are ways to run NodeJs on IIS but, without going here too deep into technical details, that really feels for me like a very strange marriage. But wait, even when you want to stick to a .Net based application, you can use nowadays Linux instead of a Windows server.
Posts
Proud to present my new blog
Why a new blog? Well, the layout of my previous blog was ready for some revision. Apart from that, thought it was, for various reasons, just time for a fresh new start.
Why a new blogging platform? Indeed, you might have noticed that I moved from WordPress to Ghost. I hope you like the layout. The main reason is not that WordPress is bad, but it’s more that I don’t want to invest in learning php, for which I feel kind of natural aversion and which I would need for fine-tuning the theme or building my own.