Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18547

Galileo - Node.js won't create WebServer.

$
0
0

Hi all,

I have been trying to create a WebServer using Node.js - however the WebServer doesn't seem to be working for me.

 

I am using the base Node.js version (0.8.18-r0 I think).

I have tried the WebServer example from www.nodejs.org website:

var http = require('http');
http.createServer(function (req, res) {  res.writeHead(200, {'Content-Type': 'text/plain'});  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

 

I can then run the example like so:

% node example.js
Server running at http://127.0.0.1:1337/

 

However when I navigate to localhost:1337 or http://127.0.0.1:1337/ the WebServer is not running.

 

When I use the Arduino Ethernet WebServer example, the WebServer will run for me.

 

Any input appreciated!


Viewing all articles
Browse latest Browse all 18547


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