undefined - "ReferenceError: handler is not defined" in Node.js -


this first line of node.js app:

var app     = require('http').createserver(handler); 

when try start doing node index.js result is:

/home/username/public_html/index.js:1 var app     = require('http').createserver(handler);                                            ^ referenceerror: handler not defined 

my node.js version 0.12.4

you that's first line of code. problem not define handler variable. should function responds request event. since optional, can (if wish) leave out entirely , add handlers events later on.

var app     = require('http').createserver(); 

Comments

Popular posts from this blog

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -