Blog

Introducing Node.js and Engine Yard Labs

By | November 17th, 2011 at 2:11PM

This is an exciting day for us. Engine Yard, the leading platform-as-a-service for Ruby on Rails and PHP—has learned a new trick. You can now run your Node.js apps on Engine Yard Cloud!

Node.js

Starting today, Engine Yard is enabling early access support for Node.js applications on Engine Yard Cloud. Node.js is a popular event-driven framework written in JavaScript that is ideal for low-latency, real-time applications.

Node.js has a growing, active and self-motivated community that reminds us of the time when we started with Ruby. We love that energy, and so do our customers.

Every Engine Yard Cloud customer—including Free Trial customers—will now be able to take advantage of Node.js features. This feature is being delivered to you through a new program called Engine Yard Labs.

Engine Yard Labs

Engine Yard Labs allows users to try out experimental new features and capabilities on the Engine Yard platform. Engine Yard Labs will accelerate the pace of innovation by involving you, the user, in the vetting of new ideas. By actively taking in your feedback, we will be able to rapidly decide and act on the most promising features for Engine Yard products.

The features released through Engine Yard Labs are not officially supported and may or may not become supported as a part of Engine Yard products in the future. Our goal is to innovate jointly with you, harvest the most compelling features and make them generally available as quickly as possible. We hope you enjoy the process and benefit from the results!

How to access Node.js

Go to the Early Access Docs Page, and request access to Node.js.

Node.js in a few minutes

If you’re new to the Node.js world, let us explain the minimum required pieces that you’ll need to assemble a new application.

  1. An application source file called “app.js”. or “server.js” A simple example using also the web framework Express looks like this:
    var express = require('express');
    var app = express.createServer();
    var port = process.env.PORT || 3000;
     
    app.get('/', function(request, response) {
       response.send('Hello Engine Yard Cloud!');
    });
     
    app.listen(port);

    We pass through the internal port number via `process.env.PORT` for your application to listen on.

  2. An application and dependency descriptor called “package.json”. We use it internally to install your Node.js dependencies via the great npm packaging system. A simple application descriptor that has the web framework Express as a dependency looks like this:
    {
       "name": "nodeApplication",
       "version": "0.0.1",
       "dependencies": {
          "express": "2.5.0"
       }
    }
  3. Store the application in a hosted git repository, just like you’re already doing with your current Engine Yard Cloud applications. Feeling a little lazy? Try a demo Node.js app we made earlier for you. With this you’re ready to deploy your first Node.js application on Engine Yard Cloud. Go to your dashboard and create a new app. This time, select Node.js in the application stack drop-down menu. Fill out the form with the information about your application, create a new environment, and deploy your app.

Perhaps now try an example that uses WebSockets.

You can read more about Node.js on Engine Yard Cloud in our documentation.

Pssst

If you’re feeling more adventurous, follow this screencast and give other experimental features a try.

  • http://blog.justinchen.net/ Justin C

    If we want to add a complementary node.js piece to an existing Rails app, is there an easy way to deploy it onto the existing Rails env? 

  • Anon

    Awesome job guys! Exciting to see Node on Engine Yard

  • http://thinkincode.net/ David Calavera

    Justin, new Rails environments already include Node.js for faster assets compilation. You could use that version to add that complementary service, although it doesn’t use the same recipes that we use for the Node.js stack for now. Which means that you would miss some of the features that we’re offering in the alpha program.

    Anyways, as an alpha service we are still open to new improvements and we would be really glad to hear your ideas. Toss me an email to dcalavera at engineyard.com I’d really appreciate your feedback.

  • http://twitter.com/hardbap Mike Breen

    Will websockets ever come to the Ruby stack so I can use Cramp or Goliath?

  • http://gadgets.mobi-world.info/2011/11/22/engine_yard_introduces_labs_and_node-js_support/ Engine Yard Introduces Labs and Node.js Support « Gadgets for mobile

    [...] &#1077&#957&#1077r-expanding PaaS provider, Engine Yard. Th&#1077 company h&#1072&#1109 introduced support f&#959r Node.js through a n&#1077w Labs [...]

  • https://www.google.com/accounts/o8/id?id=AItOawmOyhOqEwxXgatvm0eAb6F6DNbwley5Gqs Thom Mahoney

    You might have a look at this project: https://github.com/dkastner/Socket.io-ruby (No guarantees of Engine Yard’s support of it though)

  • http://blogs.techrepublic.com.com/programming-and-development/?p=4866 Developer news: NetBeans 7.1 RC1, SmartAssembly 6.5, Dryad | TechRepublic

    [...] Yard adds Node.js support Engine Yard is adding support for Node.js, a system for running JavaScript server-side in Web applications that I hear good things [...]

  • http://www.engineyard.com/blog/2011/introducing-the-early-access-features-page/ Introducing the Early Access Features page | Engine Yard Blog

    [...] week we announced Node.js support as part of our Labs program. At the beginning of this month, we also released early access to Ruby [...]