Skip to content

Require ('app') for express 3.0 #90

@alvaromuir

Description

@alvaromuir

Newbie question, but Tobi seems to think my server is never listening....

// server.js

var port = 3000;

module.exports = http.createServer(app).listen(app.get('port'), function(){
console.log("Express server listening on port " + app.get('port'));
});

// tobi

var app = require('./server')
var browser = require('tobi').createBrowser(app);

// Express server listening on port 3000

browser.get('/', function(res, $){
console.log(res)
});

browser.server

.........
_connectionKey: '4:127.0.0.1:9001',
__deferred:
[ { '0': 'GET',
'1': '/',
'2': {},
'3': [Function],
'4': undefined },
{ '0': 'GET',
'1': '/',
'2': {},
'3': [Function],
'4': undefined } ],
__port: 9001,
__started: true }

Why port 9001, and why does it think my server isn't running?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions