node

A 6-post collection

Multiple Versions of Node with n

What happens when a new version of node is released? What if you need version 0.10.36 for one app and 4.4.2 for another? Did you know version 6 is out now too? Yikes! it would be great if we could manage multiple versions of node on the same computer. Well, we can with n or nvm! These are 2 different tools that allow us to host multiple versions of node. We can use it to select which version to activate, and the toggle back to another version in seconds. They are super helpful. I prefer n, but it only works on a Mac. We can install it by running npm i -g n. Simply run n...


Angular 1 from JavaScript to TypeScript

Recently I had a great opportunity to sit down with brilliant and humble friend Chris Martin to film a Play by Play video for Pluralsight. Chris had an Angular 1 app he had written in ES5 and wanted to convert it to TypeScript. We decided to try the conversation live while filming (what could go wrong?!). The keys for us were to tackle it in a methodical way such that we could see it running as we did the conversion and to have transpilation, linting and tooling help along the way. You can watch us on this venture as we had a lot of fun exploring how to tackle this conversion. Here is the description of the video with me...


Angular 2 Tutorial - QuickStart to Routing

The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript. You can start the Tour of Heroes tutorial here. img[alt=heroes] { height=100px; width:100px} We tackle new technologies often, probably more often that we prefer. We are pressured to get up to speed on these technologies as quickly as possible. Often the technology fights back at us with awful or no documentation. Sometimes the documentation is wonderful for APIs but no so great at showing us how to think about building an app. I have a passion for Angular 2 and JavaScript so when the Angular team and Ward Bell were designing the docs at http://angular.io and they approached...


Building Apps with Node, Express, Redis and Mongo

Recently I had a great opportunity to sit down with the amazing Sam Artioli to build a flexible Node app from scratch. I love coding on the fly, and I love pair programming with awesome developers. That’s why I enjoy filming these Play by Play videos. You can watch Sam in action here. Here is the description of the video with me and Sam … In this video, NodeJS expert Sam Artioli builds a web app from scratch. You’ll learn how to set up a Node app, build a web API with Express, integrate with MongoDB, and cache HTTP results with Redis. You’ll also learn some expert techniques, such as offloading and proxying requests...


How to use npm global without sudo on OSX

When running npm and node, you may find yourself getting permission errors that ultimately lead you to using `sudo` in your commands. While this helps get around the issue in the short-term, it also places stricter permissions on those installs and it becomes a slippery slope where soon you may need sudo for more than you bargained for. Also, do you really want to be using `sudo` to install npm packages? I went down this path and some experienced Mac developers helped me see why I needed to relieve myself of `sudo` for npm. Since then I've read several great posts with directions on how to do this including Dan Herbert's fixing npm for Homebrew users and Sindre Sorhus's No...