Running node completely in Docker 🐳

I’m currently learning a few things about web development and although I am not learning NodeJS right now, I am using NodeJS to run and install stuff.

First of all, JavaScript. I’m focusing on vanilla JavaScript for now, but I am using the delightful JavaScript Testing Framework Jest.

Then while working on HTML and CSS, I like to use the package http-server, to disable cache so I don’t have to keep the Dev Tools open always to be able to see the latest uncached content.

For this reason, I require Node and NPM installed on my laptop, but I like to keep things isolated. I do know about Node Version Managers but it’s my personal setup, so I will do however I please!

So I used this Dockerfile and a few aliases to get all these commands to work directly from my host machine. πŸ’ͺ

yarn test
npm install http-server -g
http-server -c-1

Automation FTW! πŸš€

After reading about keeping dependencies up to date I had enabled it. Just yesterday I came across this tweet and was happy to see even the merging part can be automated. For my personal blog, I can have this setup without giving two thoughts about it. So I enabled mergify and added this configuration.

You can see the result in this PR. 😎