July 17th, 2016

Node.js: Simple TCP Server & Client and Promisify the Client

In this post, you will see an example of simple TCP server and client in traditional javascript way and in ES6 way. Node.js has net module which provides an asynchronous network API for creating stream-based TCP or IPC servers and clients. We are going to use it to implement TCP server and client. This post is updated with Node v6.11.2.

June 24th, 2016

nvm-windows: Node or NPM not recognized after nvm installed

To manage multiple Node.js versions on windows, you are going to use and install node-windows. After installation, you run following commands to setup specific node version:

d:\>nvm install 4.7.2
d:\>nvm use 4.7.2
d:\>node --version 

and if you get following message
‘node’ is not recognized as an internal or external command, operable program or batch file.
then read this post to troubleshoot the issue.

April 10th, 2016

Visual Studio Code: Setting Environment Variable for Tasks

Visual Studio Code (VSCode) is a lightweight, open-source code editor and available on Linux, Mac OSX, and Windows. One of the key features of Visual Studio Code is its great debugging support for Node.js (JavaScript and TypeScript) and another feature is to run Tasks(Grunt, Gulp, MSBuild…etc.) from the IDE. If you are new to VSCode, I would recommend to see following video which shows how to debug Node.js app, put break-point and use watch window, use environment variable in Visual Studio Code editor:

October 12th, 2014

A Simple CRUD with MEAN Stack (MongoDB, ExpressJS, AngularJS, Node.js) + Sails.js on Windows

MEAN stack is a full JavaScript solution that helps you build fast, robust and maintainable production web applications using MongoDB, ExpressJS, AngularJS and Node.js.

Sails.js allows you to build custom, enterprise-grade Node.js apps using the Model-View-Controller pattern to organize your code so it is easier to maintain.

New MEAN Stack = MongoDB+ExpressJS+AngularJS+Node.js+Sails.js = MEANS stack

This article explains how to implement a simple CRUD by integrating AngularJS with Sails REST APIs.