Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

New Post: http.createServer missing in intellisense

$
0
0
Hi,

When I type http.creates in Visual Studio, the only completion I see is http.createStylesheet.

Here's my complete server.js code:
var http = require('http');
var sys = require('sys');
http.creates
var server = http.createServer(function(request, response) {
    request.addListener('end', function() {
        response.writeHead(200, { 'Content-Type': 'text/plain' });
    });
    response.write();
    response.end();
});

//Default code that was put in by NTVS
//var port = process.env.port || 1337;
//http.createServer(function (req, res) {
//    res.writeHead(200, { 'Content-Type': 'text/plain' });
//    res.end('Hello World\n');
//}).listen(port);
Even though Intellisense doesn't show that createServer is there, if I uncomment out the default code, I see "Hello World" display in my browser, so it is working.

-Eric

Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>