Introducing Node.js and Engine Yard Labs
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.
- 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.
- 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" } }
- 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](https://github.com/engineyard/node-simple-example) 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.
Share your thoughts with @engineyard on Twitter