Posts

Showing posts with the label nodejs

Property-Based Testing with JSVerify

Image
Testing is important. Unit testing makes a lot of sense for Backend where we have business logic, however, for frontend, I would argue the value is not exactly the same. There is a concept called Property-Based Testing that comes from functional programming which is super useful. It makes the engineering life much easier and not only saves time typing but also makes your tests more robust with really not much more effort. So today I made a very short javascript / nodejs video talking about JSVerify . So Let's get started. Video Code https://github.com/diegopacheco/Diego-Pacheco-Sandbox/tree/master/scripts/node.js/jsverify-fun Cheers, Diego Pacheco

Actix(Rust) it's blazing fast

Image
I'm a performance aficionado. I always will be :-). However, performance is a tricky thing. It always depends on the use case. There are several things could affect a benchmark like: * Hardware * Payload size * Kind of Operation * Time * Configurations / Tunings * Warm-Up * What the code does and how I never like the blind discussions saying this server is always better than that server because I knew use cases are everything. Performance is important and in the cloud, it leads to other things like Scalability and Costs. Great performance allows better scalability, therefore it reduces costs because you do more with fewer resources(machines or containers).

Kubernetes with Docker and Minikube

Image
Kubernetes is getting more popular every day. Kubenertes is an open source system for automating deployments, scaling and managing containerized applications. Created by Google on 2014 and also know as k8s. Why? Because there are 8 letters between k and s :-). K8s has many features such as Automatic bin-packing which is the capability of placing containers based on resources and constraints.  K8s also has horizontal scaling, storage orchestration using local storage or cloud storage such as AWS or GCP. K8s has important Cloud native capabilities such as Self Healing, Service Discovery and Load Balancing and secret and dynamic config management. For this blog post, we will see how to bake a simple docker image using node js application and deploy this docker image on hibernates using minikube in order to run locally. There are other cloud-native solutions such as NetflixOSS Stack . Also Spring Cloud , which uses NetflixOSS too. However, on this post, we will ...

Downloading all your gist from github using Node.js

Image
Gists are a awesome tool for me. I use it a lot now a days. So is kind of a micro-blogging thing. For m is a great tool to find small commands for Linux, Gradle, AWS, Git, stuff i need do day by day as a engineer. Sometimes i have gist with just 1 line of code or just a command. I do that because is easy to recover this information because github search works very well and for me this is cheaper and faster than evernote. So lets say, like me you have lots of gists, you might want use gist as a blog as well or maybe you just want share some code with friends which is pretty cool as well :-) Would be handy if you could download them? You actually can, there is an JSON REST API for gist that allow you do a bunch of things.  I`m using Node.JS do download each gist and save it into a directory.  Node is very productive for this kinda of tasks thanks to the libraries like request, path and fs you can do this task with a couple of lines. You will need to have Node.Js and NPM ...

NodeJS with Vagrant

Image
On the previous post i showed how to have docker and docker-compose with Vagrant . In this post i will show how to have a simple NodeJS environment with Vagrant. I will show how to install the most common solutions and frameworks for node like: npm , express , qunit , yo and much more. It`s very easy, you need to have vagrant installed, them just copy my Vagrantfile and create a directory called shared on the same folder you have copied my Vagrant file.  After that you are ready to rock.