I suppose you don want to use node 0.4.7 currently heroku by default uses
this version if you dont specify it otherwise, try including this info in
your package.json

https://devcenter.heroku.com/articles/nodejs-versions

Regards MichaƂ Kruk

On Mon, Dec 3, 2012 at 9:05 PM, Dave Johnson <[email protected]>wrote:

> It's to do with the variable *Port* it is null when it uploaded to the
> server:
> /**
>  * Module dependencies.
>  */
> var express = require('express');
> var routes = require('./routes');
> var port = process.env.PORT || 3000;
> 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.get('/about', routes.about);
> app.get('/contact', routes.contact);
> app.listen(port);
> console.log("Express server listening on port %d in %s mode",
> app.address().port, app.settings.env);
>
>
>
> error:   TypeError: Cannot read property 'port' of null
>
>
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to