Skip to content
Browse files

got nodify working on cloud9

  • Loading branch information...
1 parent 042930a commit 9f1cdeb475cf862ab7b8b30d36b6c49a17994ff5 @jsmorris committed
Showing with 46 additions and 45 deletions.
  1. +35 −35 app.js
  2. +8 −8 package.json
  3. +3 −2 views/index.jade
View
70 app.js
@@ -1,35 +1,35 @@
-
-/**
- * Module dependencies.
- */
-
-var express = require('express')
- , routes = require('./routes')
-
-var app = module.exports = express.createServer();
-
-// Configuration
-
-app.configure(function(){
- app.set('views', __dirname + '/views');
- app.set('view engine', 'jade');
- app.use(express.bodyParser());
- app.use(express.methodOverride());
- app.use(app.router);
- app.use(express.static(__dirname + '/public'));
-});
-
-app.configure('development', function(){
- app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
-});
-
-app.configure('production', function(){
- app.use(express.errorHandler());
-});
-
-// Routes
-
-app.get('/', routes.index);
-
-app.listen(3000);
-console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
+
+/**
+ * Module dependencies.
+ */
+
+var express = require('express'),
+ routes = require('./routes');
+
+var app = module.exports = express.createServer();
+
+// Configuration
+
+app.configure(function(){
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'jade');
+ app.use(express.bodyParser());
+ app.use(express.methodOverride());
+ app.use(app.router);
+ app.use(express.static(__dirname + '/public'));
+});
+
+app.configure('development', function(){
+ app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
+});
+
+app.configure('production', function(){
+ app.use(express.errorHandler());
+});
+
+// Routes
+
+app.get('/', routes.index);
+
+app.listen(process.env.PORT, '0.0.0.0');
+console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
View
16 package.json
@@ -1,9 +1,9 @@
-{
- "name": "application-name"
- , "version": "0.0.1"
- , "private": true
- , "dependencies": {
- "express": "2.5.2"
- , "jade": ">= 0.0.1"
- }
+{
+ "name": "nodify"
+ , "version": "0.0.1"
+ , "private": true
+ , "dependencies": {
+ "express": "2.5.2"
+ , "jade": ">= 0.0.1"
+ }
}
View
5 views/index.jade
@@ -1,2 +1,3 @@
-h1= title
-p Welcome to #{title}
+h1= title
+p Welcome to #{title}
+p This is my first node.js project on Cloud9

0 comments on commit 9f1cdeb

Please sign in to comment.
Something went wrong with that request. Please try again.