SlideShare una empresa de Scribd logo
1 de 16
What is Node JS?
 A JavaScript runtime environment running Google







Chrome’s V8 engine
Node.js is a platform for building fast, scalable network
applications (web servers).
Server - side JavaScript
Uses event-driven, asynchronous I/O to minimize overhead
and maximize scalability
—Great for data-intensive, real-time applications
V8 JavaScript Engine

 V8 is written in C++ and is used in Google Chrome
 Runs on Windows (XP or newer), Mac OS X (10.5 or newer), and

Linux systems that use IA-32, x64, or ARM – you can install your
server on many devices.
What can NodeJS be used for?
 Network servers (HTTP, messaging)
 API backends
 Real time applications

 Streaming data
 Web sites
 Bots
Typical architecture
Node Package Manager (NPM)
 NPM is a package management and distribution





system for Node
you can quickly find packages to serve specific
purposes
An npm package is a directory structure with a
package.json file describing the package
Total Packages: over 31 000
can be installed simply by typing the following:
npm install moduleName
Node Package Manager (NPM)
 Databases: mysql, postgresql, mongodb
 DOM: jsdom
 Web frameworks: express, connect

 DOM Manipulation: jQuery
 Utility libraries: underscore ,backbone, request
 Templating: mustache, jade

 Testing: vows, expresso
Non-blocking I/O
 Servers do nothing but I/O (Scripts waiting on I/O

requests degrades performance )
 To avoid blocking, Node makes use of the event driven
nature of JS by attaching callbacks to I/O requests
THE NODE WAY
fs.read('very-big-file', function(data) {
complexOperation(data); }
);
// you can do a lot when waiting for data
doOtherStuff();
Blocking vs Non-Blocking flow
Basic HTTP Server
CODE:

http = require("http");
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write(“Start Hello");
res.end('Hello Worldn');
})

 when ‘stuff’ happens my function fires
 I get a request object and a response object
 I write to the response object header HTTP status 200

(Standard response for successful HTTP requests) and
content-type ‘text/plain’
 We make changes to the response object and then these are
transmitted when we call: esponse.end();
Basic HTTP Server
 This line requires the http module that ships with Node.js and

makes it accessible through the variable http.
 var http = require("http");

server = http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}).listen(8888,”127.0.0.1”);

 We pass a function into the server which it uses to handle all

incoming requests.
 When ‘stuff’ happens call this anonymous function
 Listen on port 8888 of the ip 127.0.0.1
http.ServerRequest Object
 When listening for request events, the callback gets an

http.ServerRequest object as the first argument. This
object has methods and properties:
 req.url: This property contains the requested URL as a
string. It does not contain the schema, hostname, or
port, but it contains everything after that.
 req.method: This contains the HTTP method used on
the request. It can be, for
example, GET, POST, DELETE, or HEAD.
 req.headers: This contains an object with a property for
every HTTP header on the request.
http.ServerResponse Object
 Writing headers: res.writeHead(status, headers)
 Changing or setting a header res.setHeader(name, value);
 Writing a Piece of the Response Body:

res.write('Hello');
 or use an existing buffer:

var buffer = new Buffer('Hello World');
res.write(buffer);

 Streaming a mp4
var fs = require('fs');
require('http').createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'video/mp4'});
var rs = fs.createReadStream('test.mp4');
rs.pipe(res);

}).listen(4000);
Basic node JS Module








var mysql
= require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'nod',
password : 'nodejs',
database : "test"
});






function connectDatabase() {
connection.connect();
console.log("db connected");
}











//insert data to database and call the function received
function insertDatabase( data , callback ) {



exports.startDatabase = connectDatabase;



exports.insertDatabase = insertDatabase;;

connection.query('INSERT INTO users (user) VALUES (?)',[data.clientName], function ( err, result ) {
if (err) throw err;
//calling callback function from server-chat.js
callback ( result.insertId );
});
}
Example
 Free Spark implementation:

http://10.182.39.2/
Cosmin Mereuta

Más contenido relacionado

La actualidad más candente

Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleTom Croucher
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & ExpressChristian Joudrey
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developerscacois
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming Tom Croucher
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven ProgrammingKamal Hussain
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS ExpressDavid Boyer
 

La actualidad más candente (20)

Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
NodeJS
NodeJSNodeJS
NodeJS
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developers
 
Node ppt
Node pptNode ppt
Node ppt
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
 
Node.js in production
Node.js in productionNode.js in production
Node.js in production
 
Node.js - As a networking tool
Node.js - As a networking toolNode.js - As a networking tool
Node.js - As a networking tool
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming
 
Node.js
Node.jsNode.js
Node.js
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 

Similar a Scalable network applications, event-driven - Node JS

Similar a Scalable network applications, event-driven - Node JS (20)

nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.ppt
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
node js.pptx
node js.pptxnode js.pptx
node js.pptx
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.js
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node js getting started
Node js getting startedNode js getting started
Node js getting started
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
Web Server.pdf
Web Server.pdfWeb Server.pdf
Web Server.pdf
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
 
Introduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectIntroduction to Node js for beginners + game project
Introduction to Node js for beginners + game project
 
Node.js 1, 2, 3
Node.js 1, 2, 3Node.js 1, 2, 3
Node.js 1, 2, 3
 
Ajax
AjaxAjax
Ajax
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 
5.node js
5.node js5.node js
5.node js
 
08 ajax
08 ajax08 ajax
08 ajax
 
Node.js System: The Approach
Node.js System: The ApproachNode.js System: The Approach
Node.js System: The Approach
 
Node js beginner
Node js beginnerNode js beginner
Node js beginner
 

Último

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Scalable network applications, event-driven - Node JS

  • 1.
  • 2. What is Node JS?  A JavaScript runtime environment running Google     Chrome’s V8 engine Node.js is a platform for building fast, scalable network applications (web servers). Server - side JavaScript Uses event-driven, asynchronous I/O to minimize overhead and maximize scalability —Great for data-intensive, real-time applications
  • 3. V8 JavaScript Engine  V8 is written in C++ and is used in Google Chrome  Runs on Windows (XP or newer), Mac OS X (10.5 or newer), and Linux systems that use IA-32, x64, or ARM – you can install your server on many devices.
  • 4. What can NodeJS be used for?  Network servers (HTTP, messaging)  API backends  Real time applications  Streaming data  Web sites  Bots
  • 6. Node Package Manager (NPM)  NPM is a package management and distribution     system for Node you can quickly find packages to serve specific purposes An npm package is a directory structure with a package.json file describing the package Total Packages: over 31 000 can be installed simply by typing the following: npm install moduleName
  • 7. Node Package Manager (NPM)  Databases: mysql, postgresql, mongodb  DOM: jsdom  Web frameworks: express, connect  DOM Manipulation: jQuery  Utility libraries: underscore ,backbone, request  Templating: mustache, jade  Testing: vows, expresso
  • 8. Non-blocking I/O  Servers do nothing but I/O (Scripts waiting on I/O requests degrades performance )  To avoid blocking, Node makes use of the event driven nature of JS by attaching callbacks to I/O requests THE NODE WAY fs.read('very-big-file', function(data) { complexOperation(data); } ); // you can do a lot when waiting for data doOtherStuff();
  • 10. Basic HTTP Server CODE: http = require("http"); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.write(“Start Hello"); res.end('Hello Worldn'); })  when ‘stuff’ happens my function fires  I get a request object and a response object  I write to the response object header HTTP status 200 (Standard response for successful HTTP requests) and content-type ‘text/plain’  We make changes to the response object and then these are transmitted when we call: esponse.end();
  • 11. Basic HTTP Server  This line requires the http module that ships with Node.js and makes it accessible through the variable http.  var http = require("http"); server = http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end(); }).listen(8888,”127.0.0.1”);  We pass a function into the server which it uses to handle all incoming requests.  When ‘stuff’ happens call this anonymous function  Listen on port 8888 of the ip 127.0.0.1
  • 12. http.ServerRequest Object  When listening for request events, the callback gets an http.ServerRequest object as the first argument. This object has methods and properties:  req.url: This property contains the requested URL as a string. It does not contain the schema, hostname, or port, but it contains everything after that.  req.method: This contains the HTTP method used on the request. It can be, for example, GET, POST, DELETE, or HEAD.  req.headers: This contains an object with a property for every HTTP header on the request.
  • 13. http.ServerResponse Object  Writing headers: res.writeHead(status, headers)  Changing or setting a header res.setHeader(name, value);  Writing a Piece of the Response Body: res.write('Hello');  or use an existing buffer: var buffer = new Buffer('Hello World'); res.write(buffer);  Streaming a mp4 var fs = require('fs'); require('http').createServer(function(req, res) { res.writeHead(200, {'Content-Type': 'video/mp4'}); var rs = fs.createReadStream('test.mp4'); rs.pipe(res); }).listen(4000);
  • 14. Basic node JS Module        var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'nod', password : 'nodejs', database : "test" });     function connectDatabase() { connection.connect(); console.log("db connected"); }          //insert data to database and call the function received function insertDatabase( data , callback ) {  exports.startDatabase = connectDatabase;  exports.insertDatabase = insertDatabase;; connection.query('INSERT INTO users (user) VALUES (?)',[data.clientName], function ( err, result ) { if (err) throw err; //calling callback function from server-chat.js callback ( result.insertId ); }); }
  • 15. Example  Free Spark implementation: http://10.182.39.2/