Adding constraint on a foreign key with node-pg-migration

node-pg-migration is a useful library. You can add a constraint of a foreign key with a simple references property on the column. For example, you have table client_session with publishable_key column and you want to reference publishable_key column in workspace table where it is not a primary key (just a unique key). The following usage … Continue reading “Adding constraint on a foreign key with node-pg-migration”

Acquisition of Node University by DevelopIntelligence

After 2.5 years of starting my online school for software engineers Node University and growing it to one of the best resources on Node.js, APIs and AWS, I’m happy to announce the acquisition of Node University by the tech training company DevelopIntelligence. šŸ’°šŸ˜ŽšŸ¾ I’ve known and worked with DevelopIntelligence for many years. They deliver outstanding … Continue reading “Acquisition of Node University by DevelopIntelligence”

Node v8 and npm5

It’s finally here. Node v8 which is based on Chrome V8. Got the pun? Haha. What’s new? Here’s a gist: Better native (C/C++) modules support with N-API V8 v5.8: better performance and dev-facing APIs util.promisify(): improved support for Promises in the core Newer CLI debugger: replacement of the debugger WHATWG URL Parser Buffer improvement For … Continue reading “Node v8 and npm5”

Node Toolchain for Newbies: The Best Node Apps and Libraries to Increase Productivity

I get this question very often: ā€œWhat tools would you recommend for Node development?ā€ Software engineers love to optimize and increase productivity instead of wasting their time. I bet you are one of them! Read on to find out the best Node tools for development. IDEs/code editors Libraries GUI tools CLI tools IDEs/code editors When … Continue reading “Node Toolchain for Newbies: The Best Node Apps and Libraries to Increase Productivity”

How Node Event Loop REALLY Works: Or Why Most of the Event Loop Diagrams are WRONG

When Bert presented his keynote at Node Interactive Europe 2016 on Event Loop, he started by saying that most of event loops diagrams are WRONG. Iā€™m guilty of using one of them in my talks. :) This is it. In it, event loop is spinning data back at clients like hot-cakes. His diagram is closer … Continue reading “How Node Event Loop REALLY Works: Or Why Most of the Event Loop Diagrams are WRONG”

Beautiful Node APIs

This post is on how to build beautiful APIs in Node.js. Great, and what is an API? The definition says Application Programming Interface, but what does it mean? It could mean on of the few things depending on the context: Endpoints of a service service-oriented architecture (SOA) Function signature Class attribute and methods The main … Continue reading “Beautiful Node APIs”

Node.js in Containers Using Docker

Container technology is one of the best options for software development and deployment. It allows you to share some of the OS resources while encapsulating the code and other concerns. You can think of containers as virtual machines but with less footprint. Containers are great for micro services where you replace monoliths with many services. … Continue reading “Node.js in Containers Using Docker”

Node Interactive Europe 2016 Recap

I went to Node Interactive Europe which happened in September in Amsterdam, the official Node conferenceā€”the real deal. Organizers invited me to present on React, so I taught a workshop on Universal Web, and also participated on a panel discussion about containers and Node with folks from nearFrom, IBM, Zeit and Netflix. You should watch … Continue reading “Node Interactive Europe 2016 Recap”

Optimize Your App with HTTP/2 Server Push Using Node and Express

HTTP/2 is the new standard of the web. It has many great features which will make the web faster and simplify the development. For example, no need to concatenate files thanks to multiplexing, or a server push which can send files before a browser knows it need them. This post won’t cover all advantages of … Continue reading “Optimize Your App with HTTP/2 Server Push Using Node and Express”

3 Conferences in 4 Days: NodeSummit, ForwardJS and npmCamp 2016

Last week was very fruitful on conferences. Luckily, there were all in the Bay Area so I didn’t have to travel. I spoke at NodeSummit and ForwardJS, and attended npmCamp. At all of them, I met old friends and made new ones. All of them were great but in different way. NodeSummit 2016 NodeSummit started … Continue reading “3 Conferences in 4 Days: NodeSummit, ForwardJS and npmCamp 2016”

Easy HTTP/2 Server with Node.js and Express.js

The modern Internet with its TCP/IP protocol started around 1975 which is astonishing 41 years ago. For the most part of its existence, we used HTTP and itā€™s successor HTTP/1.1 (version 1.1) to communicate between clients and servers. It served the web well but the way developers build websites has dramatically changed. There are myriads … Continue reading “Easy HTTP/2 Server with Node.js and Express.js”

JSON is Not Cool Anymore: Implementing Protocol Buffers in Node.js

Thereā€™s a better alternative to the ubiquitous JSON as the communication protocol of the web. Itā€™s Protocol Buffers (protobuf). In a nutshell, protobuf offers a more dense format (faster processing) and provides data schemas (enforcement of structure and better compatibility with old code). Protocol Buffers were introduced by Google. You can read, more about them … Continue reading “JSON is Not Cool Anymore: Implementing Protocol Buffers in Node.js”

You Don’t Know Node: Quick Intro to Core Features

This essay was inspired by the Kyle Simpsonā€™s series of books, You Donā€™t Know JavaScript. They are a good start with JavaScript fundamentals. Node is mostly JavaScript except for a few differences which Iā€™ll highlight in this essay. The code is in the You Donā€™t Know Node GitHub repository under the code folder. Why care … Continue reading “You Don’t Know Node: Quick Intro to Core Features”

Node Patterns: From Callbacks to Observer

UPDATE: Now also available as a video (taken at NodePDX 2016) on YouTube. This essay started as a presentation at the ConFoo Canada conference. Enjoy the slides ? at https://github.com/azat-co/node-patterns: git clone https://github.com/azat-co/node-patterns Before we can get started with Node patterns, letā€™s touch on some of the main advantages and features of using Node. Theyā€™ll … Continue reading “Node Patterns: From Callbacks to Observer”

Node Interactive 2015

Last week, I presented my talk at the inaugural Node Interactive ā€™15, in Portland, Oregon. Itā€™s probably the largest Node.js conference in the world! My talk was on Node.js at Capital One. You might wonder: bank and Node.js? What they have in common? The best kept secret, which is not a secret at all is … Continue reading “Node Interactive 2015”

ExpressWorks Walkthrough: Node.js Web Framework [VIDEOS]

Have you ever wanted to learn basics of Node.js and the most popular Node.js web framework Express.js? If you are experienced web developer or software engineer who wants to learn Node.js and build some servers along the way, then this self-study workshop is for you. What is ExpressWorks? It’s an automated tool which allows to … Continue reading “ExpressWorks Walkthrough: Node.js Web Framework [VIDEOS]”

Contrasting Enterprise Node.js Frameworks: Hapi vs. Kraken vs. Sails.js vs. Loopback

I published this essay Contrasting Enterprise Node.js Frameworks: Hapi vs. Kraken vs. Sails.js vs. Loopback on the Capital One engineering blogĀ . Feel free to leave a comment! Here’s a blurb: Node.js/Io.js is a non-blocking I/O platform based on the JavaScript language. It has been capturing the hearts and minds of software developers for the past … Continue reading “Contrasting Enterprise Node.js Frameworks: Hapi vs. Kraken vs. Sails.js vs. Loopback”

Write Templates Like A Node.js Pro: Handlebars Tutorial

I’ve wrote how I struggled with Jade, but I had no choice except to master it. However, before beginning to understand Jade, I admired Handlebars GREATLY. I did it mostly for its simplicity and similarity with plain HTML. If you want to write templates for Node.js apps, then consider Handlebars. This short tutorial will get … Continue reading “Write Templates Like A Node.js Pro: Handlebars Tutorial”