background preloader

Node js

Facebook Twitter

Node Tuts.

Advanced nodejs

NodeJS Cheat Sheet. NodeSource - Enterprise Node.js Training, Support, Software & Consulting, Worldwide. New Course: Create a Custom Yeoman Generator - Tuts+ Code Article. Running Node.js apps in production. Frederic Hemberger @fhemberger Topics I'll talk about today: Deployment Run Node.js (and keep it running) Metrics Deployment Deployment Different popular deployment techniques: Git Hooks GitHub Webhooks Capistrano, Fabric,, et. al.

Running Node.js apps in production

Git Hooks Pushing to Git remote on your server cd /var/www/ git pull npm install --production service myapp restart ... Done. Git Hooks Pro: Easy for the developer: Just push to production (aka fire and forget) Hosting-Platforms like Heroku use this method as well Con: But what happens on the server? Solution: Add the deploy script to your repository and symlink to post-receive-hook. GitHub Webhooks When the rest of your development work already resolves around GitHub, it integrates nicely into the workflow Hooks run all independently in parallel: E.g. if the CI hook fails, the webhook for deployment still gets triggered. How To Set Up a Node.js Application for Production on Ubuntu 14.04. Introduction Node.js is an open source Javascript runtime environment for easily building server-side and networking applications.

How To Set Up a Node.js Application for Production on Ubuntu 14.04

The platform runs on Linux, OS X, FreeBSD, and Windows, and its applications are written in JavaScript. Node.js applications can be run at the command line but we will teach you how to run them as a service, so they will automatically restart on reboot or failure, so you can use them in a production environment. In this tutorial, we will cover setting up a production-ready Node.js environment that is composed of two Ubuntu 14.04 servers; one server will run Node.js applications managed by PM2, while the other will provide users with access to the application through an Nginx reverse proxy to the application server. The CentOS version of this tutorial can be found here. Prerequisites This guide uses two Ubuntu 14.04 servers with private networking (in the same datacenter).

Here is a diagram of what your setup will be after following this tutorial: How We Built eBay’s First Node.js Application — eBay Tech Blog. For the most part, eBay runs on a Java-based tech stack.

How We Built eBay’s First Node.js Application — eBay Tech Blog

Our entire workflow centers around Java and the JVM. Considering the scale of traffic and the stability required by a site like, using a proven technology was an obvious choice. But we have always been open to new technologies, and Node.js has been topping the list of candidates for quite some time. This post highlights a few aspects of how we developed eBay's first Node.js application. Scalability It all started when a bunch of eBay engineers (Steven, Venkat, and Senthil) wanted to bring an eBay Hackathon-winning project called "Talk" to production.

Mindset Since eBay revolves around Java and since Java is a strongly typed static language, initially it was very difficult to convince folks to use JavaScript on the backend. Within a couple of days, we had an exhaustive list to work on. Production Practices - Developer Center. Hosting Node Apps. This tutorial walks you through setting up a server that can host node.js apps for server-side JavaScript applications.

Hosting Node Apps

Right now, the node.js hosting options boil down to running node daemon processes that talk to a web server. Most web servers can proxy connections to a different port, so you’ll be able to use Apache or nginx to do this. Step 1: Get a Server or VM I’m using a VMware virtual machine. This is a good way of trying things out before spending money on Amazon or a web host. Let’s get started quickly by downloading a Debian net installer ISO. The standard install options I checked were: DNS server Email server SSH server Standard utilities File sharing (for getting files in/out easily, not needed in production) Step 2: Packages I installed the following packages: apt-get install sudo vim-nox nginx unzip g++ screen git-core monit Step 3: Node You can download Node’s source wherever you want: git clone Then build it:

Express - api reference. Node.js Stream Playground. Node.js Tutorials. Maxogden/art-of-node. How do I get started with Node.js.