JS Blog Software development, entertainment, lifestyle.

Tagstatic files

One-liner for serving static files in Go explained

O

Whenever I want to set up a server for serving static files in Go, which is not often, I always have to spend some time to figure out the following one-liner. http.Handle("/images/", http.StripPrefix("/images/", http.FileServer(http.Dir("./images")))) What confuses me probably the most here is all three strings being practically the same. So in this post I will explain what this does for my...

Serving Node application in production

S

When we want to serve our Node app in production and with best performance, we need to minimize our static files (javascript, stylesheets, images,…), setup Nginx for serving those static files/proxying requests to our application server and installing process manager that will keep our application alive in case of crashes. Minimizing our static files is done with help of tools like Grunt...

JS Blog Software development, entertainment, lifestyle.

About me

Jernej Sila portrait
Hi, I'm Jernej, a software engineer from Slovenia. Welcome to my personal blog. For more about me, my work and hobbies, please visit my profile page.

Categories

Archives