milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. JavaScript
  4. node.js

node.js "Hello World" example

Details
Written by: Stanko Milosev
Category: node.js
Published: 25 August 2014
Last Updated: 27 November 2015
Hits: 4788

From Node.js v0.10.31 Manual & Documentation I copied example, like:

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello World\n');
}).listen(8124);

console.log('Server running at http://127.0.0.1:8124/');

If you save example like "example.js" and after starting server in command prompt with:

node example.js

in your browser go to the address:

http://localhost:8124/

and you should see "Hello World"

WSS

Details
Written by: Stanko Milosev
Category: node.js
Published: 30 November -0001
Last Updated: 23 July 2015
Hits: 1438

WSS stands for encrypted websocket connection. 

 

Page 2 of 2

  • 1
  • 2