SlideShare a Scribd company logo
1 of 38
Page 1
Node.js
from the beginning
MunichJS, January 2016, Munich
16-01-15 Node.js – from the Beginning
Page 2
 Robert Prediger
 20 years: Progress
 15 years: Web development
 5 years: Node.js
 robert.prediger@web4biz.de
16-01-15
Introduction
Node.js – from the Beginning
Page 3
Installation
16-01-15 Node.js – from the Beginning
Page 4
Installation
16-01-15 Node.js – from the Beginning
Page 5
npm is a piece of technology, but more
importantly, it is a community.
npm makes it easy for JavaScript developers to
share and reuse code, and it makes it easy to
update the code that you're sharing.
https://www.npmjs.com/
Node.js – from the Beginning
npm
16-01-15
Page 6
npm
Node.js - What?6-Nov-15
Page 7
npm
Node.js – from the Beginning16-01-15
Source: http://www.modulecounts.com/
Page 8
Socket.IO enables real-time bidirectional
event-based communication.
It works on every platform, browser or device,
focusing equally on reliability and speed.
USED BY EVERYONE
From Microsoft Office, Yammer, Zendesk, Trello...
to hackathon winners and little startups.
http://socket.io/
Node.js – from the Beginning
socket.io
16-01-15
Page 9
var express = require('express'),
app = express(),
server = require('http').createServer( app ).listen( config.port ),
io = require('socket.io').listen( server ),
numConn = 0;
...
Node.js – from the Beginning
socket.io
16-01-15
Page 10
...
io.on( 'connection', function(socket) {
numConn += 1;
console.log( "connected", numConn );
// event for login from socket
socket.on( "login", function ( name ) {
socket.nickname = name;
});
...
socket.on( "disconnect", function() {
numConn -= 1;
console.log( "disconnect", numConn );
});
});
Node.js – from the Beginning
socket.io
16-01-15
Page 11
...
// socket sends message
socket.on( "sendMessage", function( msg ) {
console.log( "send message", numConn, socket.nickname, msg );
// broadcast message to all subscribed sockets
socket.broadcast.emit( "newMessage", {
name: socket.nickname,
msg: msg
} );
});
...
Node.js – from the Beginning
socket.io
16-01-15
Page 12
Demo
Node.js – from the Beginning
socket.io
16-01-15
Page 13
Fast, unopinionated, minimalist
web framework for Node.js
Minimal and flexible Node.js web application framework
that provides a robust set of features for web and mobile
applications.
http://expressjs.com/
Node.js – from the Beginning
express
16-01-15
Page 14
express
16-01-15 Node.js – from the Beginning
favicon
Static-Files
Log
Process Request
... (other middleware modules)
Page 15
var express = require('express'),
app = express();
app.get( "/rest/:table", auth, function( req, res ) {
res.send( "Request: " + req.params.table );
});
app.get( "/rest/:table/:id", auth, function( req, res ) {
res.send( req.params );
});
app.get( "/", function( req, res ) {
console.log( "req" );
res.send( "Hello World" );
});
app.listen( 80 );
Node.js – from the Beginning
express
16-01-15
Page 16
var express = require('express'),
app = express() ,
router = express.Router();
// use router with prefix
app.use( "/rest", auth, router );
router.get( "/:table", function( req, res ) {
res.send( "Request: " + req.params.table );
});
router.get( "/:table/:id", function( req, res ) {
res.send( req.params );
});
app.get( "/", function( req, res ) {
console.log( "req" );
res.send( "Hello World" );
});
app.listen( 80 );
Node.js – from the Beginning
express
16-01-15
Page 17
var express = require('express'),
app = express();
app.use( function( req, res, next ) {
var start = new Date;
console.log( "way down", req.url );
next();
console.log( 'way back' );
console.log( 'Response-Time', new Date - start );
});
app.get( "/", function( req, res ) {
console.log( "req" );
res.send( "Hello World" );
});
app.listen( 80 );
Node.js – from the Beginning
express
16-01-15
Page 18
var express = require('express'),
app = express();
app.use( function( req, res, next ) {
var start = new Date;
console.log( "way down", req.url );
next();
console.log( 'way back' );
console.log( 'Response-Time', new Date - start );
});
app.get( "/", function( req, res ) {
process.nextTick( function() {
console.log( "req" );
res.send( "Hello World" );
});
});
app.listen( 80 );
Node.js – from the Beginning
express
16-01-15
Page 19
Enterprise Node to Power the API
Economy
No matter where you are in the lifecycle of developing
APIs with Node, StrongLoop has a complete set of
command-line and graphical tools that can work together
or independently to help you succeed.
https://strongloop.com/
Node.js – from the Beginning
StrongLoop
16-01-15
Page 20
Strongloop
Node.js – from the Beginning16-01-15
Page 21
Strongloop
Node.js – from the Beginning16-01-15
Source: https://strongloop.com/node-js/arc/
Page 22
Strongloop
Node.js – from the Beginning16-01-15
Source: https://strongloop.com/node-js/arc/
Page 23
The web framework of your dreams
Built for developers by a giant squid.
Sails makes it easy to build custom, enterprise-grade
Node.js apps. It is designed to emulate the familiar MVC
pattern of frameworks like Ruby on Rails, but with
support for the requirements of modern apps.
http://sailsjs.org/
Node.js – from the Beginning
SailsJS
16-01-15
Page 24
SailsJS
Node.js – from the Beginning16-01-15
Source: https://www.manning.com/books/sails-js-in-action
Page 25
SailsJS
Node.js – from the Beginning16-01-15
Source: https://www.manning.com/books/sails-js-in-action
Page 26
next generation web framework for
node.js
Koa is a new web framework designed by the team
behind Express, which aims to be a smaller, more
expressive, and more robust foundation for web
applications and APIs.
http://koajs.com/
Node.js – from the Beginning
Koa
16-01-15
Page 27
var koa = require('koa'),
app = koa();
app.use( function *(next){
var start = new Date;
yield next;
var ms = new Date - start;
this.set('Response-Time', ms + 'ms');
});
app.use( function *(){
this.body = 'Hello World';
});
app.listen( 80 );
Node.js – from the Beginning
Koa (1.x)
16-01-15
Page 28
var Koa = require('koa'),
app = new Koa(),
co = require('co');
app.use( co.wrap( function *( ctx, next){
const start = new Date;
yield next();
var ms = new Date - start;
console.log( 'Response-Time', ms );
}));
app.use( ctx => {
ctx.body = 'Hello World';
});
app.listen( 80 );
Node.js – from the Beginning
Koa (2.x)
16-01-15
Page 29
The Web framework beyond your dreams
ThinkJS is the first Node.js MVC framework that
supporting use full ES6/7 features to develop Node.js
application.
https://thinkjs.org/
Node.js – from the Beginning
ThinkJS
16-01-15
Page 30
ThinkJS
Node.js – from the Beginning16-01-15
Page 31
ThinkJS
Node.js – from the Beginning16-01-15
Page 32
ThinkJS
Node.js – from the Beginning16-01-15
Page 33
Disadvantages
Even though ThinkJS has many advantages, it has also a few
disadvantages too, for example:
• ThinkJS is a relatively new framework, the
community is not strong enough.
• ThinkJS is short of large scale applications.
Node.js – from the Beginning
ThinkJS
16-01-15
Page 34
Build powerful back-end with no effort.
Fast. Reusable. Easy to use.
The next generation framework for Node.js
built on top of Koa.
http://strapi.io/
Node.js – from the Beginning
strapi
16-01-15
Page 35
strapi
Node.js – from the Beginning16-01-15
Page 36
strapi
Node.js – from the Beginning16-01-15
Page 37
strapi
Node.js – from the Beginning16-01-15
Page 3816-01-15 Node.js – from the Beginning
That‘s it 
Thank you very much for listening
robert.prediger@web4biz.de
Sourcecode:https://github.com/web4biz/Node.js-FromTheBeginning

More Related Content

What's hot

Angular 1 + es6
Angular 1 + es6Angular 1 + es6
Angular 1 + es6장현 한
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Changwan Jun
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Node4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorldNode4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorldIan Bull
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS ExpressDavid Boyer
 
Running JavaScript Efficiently in a Java World
Running JavaScript Efficiently in a Java WorldRunning JavaScript Efficiently in a Java World
Running JavaScript Efficiently in a Java Worldirbull
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptLars Thorup
 
Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Роман Лютиков "Web Apps Performance & JavaScript Compilers"Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Роман Лютиков "Web Apps Performance & JavaScript Compilers"Fwdays
 
Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險Fred Chien
 
First steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSFirst steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSSergey Matyunin
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end WorkflowPagepro
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.jsFred Chien
 
Node js实践
Node js实践Node js实践
Node js实践jay li
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for startersBruce Li
 

What's hot (20)

Angular 1 + es6
Angular 1 + es6Angular 1 + es6
Angular 1 + es6
 
Aws
AwsAws
Aws
 
Node js
Node jsNode js
Node js
 
Griffon @ Svwjug
Griffon @ SvwjugGriffon @ Svwjug
Griffon @ Svwjug
 
Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기Serverless 프레임워크로 Nuxt 앱 배포하기
Serverless 프레임워크로 Nuxt 앱 배포하기
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Node4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorldNode4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorld
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Running JavaScript Efficiently in a Java World
Running JavaScript Efficiently in a Java WorldRunning JavaScript Efficiently in a Java World
Running JavaScript Efficiently in a Java World
 
Node ppt
Node pptNode ppt
Node ppt
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScript
 
Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Роман Лютиков "Web Apps Performance & JavaScript Compilers"Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Роман Лютиков "Web Apps Performance & JavaScript Compilers"
 
Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險
 
First steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROSFirst steps with Gazebo simulation for ROS
First steps with Gazebo simulation for ROS
 
Asm.js introduction
Asm.js introductionAsm.js introduction
Asm.js introduction
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.js
 
Node js实践
Node js实践Node js实践
Node js实践
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 

Similar to Node.js from Beginning MunichJS

Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developerEdureka!
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperEdureka!
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsNicholas Jansma
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyUlrich Krause
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaBabacar NIANG
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Visual Engineering
 
Node js introduction
Node js introductionNode js introduction
Node js introductionAlex Su
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN StackNir Noy
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayEdureka!
 
Kraken
KrakenKraken
KrakenPayPal
 
soscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profitsoscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profithanbeom Park
 
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Codemotion
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSJulio Antonio Mendonça de Marins
 
A Closer Look At React Native
A Closer Look At React NativeA Closer Look At React Native
A Closer Look At React NativeIan Wang
 

Similar to Node.js from Beginning MunichJS (20)

Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
jsDay 2016 recap
jsDay 2016 recapjsDay 2016 recap
jsDay 2016 recap
 
Node js
Node jsNode js
Node js
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux Saga
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
 
Kraken
KrakenKraken
Kraken
 
soscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profitsoscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profit
 
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
 
A Closer Look At React Native
A Closer Look At React NativeA Closer Look At React Native
A Closer Look At React Native
 

Recently uploaded

VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 

Recently uploaded (20)

VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 

Node.js from Beginning MunichJS

  • 1. Page 1 Node.js from the beginning MunichJS, January 2016, Munich 16-01-15 Node.js – from the Beginning
  • 2. Page 2  Robert Prediger  20 years: Progress  15 years: Web development  5 years: Node.js  robert.prediger@web4biz.de 16-01-15 Introduction Node.js – from the Beginning
  • 3. Page 3 Installation 16-01-15 Node.js – from the Beginning
  • 4. Page 4 Installation 16-01-15 Node.js – from the Beginning
  • 5. Page 5 npm is a piece of technology, but more importantly, it is a community. npm makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you're sharing. https://www.npmjs.com/ Node.js – from the Beginning npm 16-01-15
  • 6. Page 6 npm Node.js - What?6-Nov-15
  • 7. Page 7 npm Node.js – from the Beginning16-01-15 Source: http://www.modulecounts.com/
  • 8. Page 8 Socket.IO enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed. USED BY EVERYONE From Microsoft Office, Yammer, Zendesk, Trello... to hackathon winners and little startups. http://socket.io/ Node.js – from the Beginning socket.io 16-01-15
  • 9. Page 9 var express = require('express'), app = express(), server = require('http').createServer( app ).listen( config.port ), io = require('socket.io').listen( server ), numConn = 0; ... Node.js – from the Beginning socket.io 16-01-15
  • 10. Page 10 ... io.on( 'connection', function(socket) { numConn += 1; console.log( "connected", numConn ); // event for login from socket socket.on( "login", function ( name ) { socket.nickname = name; }); ... socket.on( "disconnect", function() { numConn -= 1; console.log( "disconnect", numConn ); }); }); Node.js – from the Beginning socket.io 16-01-15
  • 11. Page 11 ... // socket sends message socket.on( "sendMessage", function( msg ) { console.log( "send message", numConn, socket.nickname, msg ); // broadcast message to all subscribed sockets socket.broadcast.emit( "newMessage", { name: socket.nickname, msg: msg } ); }); ... Node.js – from the Beginning socket.io 16-01-15
  • 12. Page 12 Demo Node.js – from the Beginning socket.io 16-01-15
  • 13. Page 13 Fast, unopinionated, minimalist web framework for Node.js Minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. http://expressjs.com/ Node.js – from the Beginning express 16-01-15
  • 14. Page 14 express 16-01-15 Node.js – from the Beginning favicon Static-Files Log Process Request ... (other middleware modules)
  • 15. Page 15 var express = require('express'), app = express(); app.get( "/rest/:table", auth, function( req, res ) { res.send( "Request: " + req.params.table ); }); app.get( "/rest/:table/:id", auth, function( req, res ) { res.send( req.params ); }); app.get( "/", function( req, res ) { console.log( "req" ); res.send( "Hello World" ); }); app.listen( 80 ); Node.js – from the Beginning express 16-01-15
  • 16. Page 16 var express = require('express'), app = express() , router = express.Router(); // use router with prefix app.use( "/rest", auth, router ); router.get( "/:table", function( req, res ) { res.send( "Request: " + req.params.table ); }); router.get( "/:table/:id", function( req, res ) { res.send( req.params ); }); app.get( "/", function( req, res ) { console.log( "req" ); res.send( "Hello World" ); }); app.listen( 80 ); Node.js – from the Beginning express 16-01-15
  • 17. Page 17 var express = require('express'), app = express(); app.use( function( req, res, next ) { var start = new Date; console.log( "way down", req.url ); next(); console.log( 'way back' ); console.log( 'Response-Time', new Date - start ); }); app.get( "/", function( req, res ) { console.log( "req" ); res.send( "Hello World" ); }); app.listen( 80 ); Node.js – from the Beginning express 16-01-15
  • 18. Page 18 var express = require('express'), app = express(); app.use( function( req, res, next ) { var start = new Date; console.log( "way down", req.url ); next(); console.log( 'way back' ); console.log( 'Response-Time', new Date - start ); }); app.get( "/", function( req, res ) { process.nextTick( function() { console.log( "req" ); res.send( "Hello World" ); }); }); app.listen( 80 ); Node.js – from the Beginning express 16-01-15
  • 19. Page 19 Enterprise Node to Power the API Economy No matter where you are in the lifecycle of developing APIs with Node, StrongLoop has a complete set of command-line and graphical tools that can work together or independently to help you succeed. https://strongloop.com/ Node.js – from the Beginning StrongLoop 16-01-15
  • 20. Page 20 Strongloop Node.js – from the Beginning16-01-15
  • 21. Page 21 Strongloop Node.js – from the Beginning16-01-15 Source: https://strongloop.com/node-js/arc/
  • 22. Page 22 Strongloop Node.js – from the Beginning16-01-15 Source: https://strongloop.com/node-js/arc/
  • 23. Page 23 The web framework of your dreams Built for developers by a giant squid. Sails makes it easy to build custom, enterprise-grade Node.js apps. It is designed to emulate the familiar MVC pattern of frameworks like Ruby on Rails, but with support for the requirements of modern apps. http://sailsjs.org/ Node.js – from the Beginning SailsJS 16-01-15
  • 24. Page 24 SailsJS Node.js – from the Beginning16-01-15 Source: https://www.manning.com/books/sails-js-in-action
  • 25. Page 25 SailsJS Node.js – from the Beginning16-01-15 Source: https://www.manning.com/books/sails-js-in-action
  • 26. Page 26 next generation web framework for node.js Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. http://koajs.com/ Node.js – from the Beginning Koa 16-01-15
  • 27. Page 27 var koa = require('koa'), app = koa(); app.use( function *(next){ var start = new Date; yield next; var ms = new Date - start; this.set('Response-Time', ms + 'ms'); }); app.use( function *(){ this.body = 'Hello World'; }); app.listen( 80 ); Node.js – from the Beginning Koa (1.x) 16-01-15
  • 28. Page 28 var Koa = require('koa'), app = new Koa(), co = require('co'); app.use( co.wrap( function *( ctx, next){ const start = new Date; yield next(); var ms = new Date - start; console.log( 'Response-Time', ms ); })); app.use( ctx => { ctx.body = 'Hello World'; }); app.listen( 80 ); Node.js – from the Beginning Koa (2.x) 16-01-15
  • 29. Page 29 The Web framework beyond your dreams ThinkJS is the first Node.js MVC framework that supporting use full ES6/7 features to develop Node.js application. https://thinkjs.org/ Node.js – from the Beginning ThinkJS 16-01-15
  • 30. Page 30 ThinkJS Node.js – from the Beginning16-01-15
  • 31. Page 31 ThinkJS Node.js – from the Beginning16-01-15
  • 32. Page 32 ThinkJS Node.js – from the Beginning16-01-15
  • 33. Page 33 Disadvantages Even though ThinkJS has many advantages, it has also a few disadvantages too, for example: • ThinkJS is a relatively new framework, the community is not strong enough. • ThinkJS is short of large scale applications. Node.js – from the Beginning ThinkJS 16-01-15
  • 34. Page 34 Build powerful back-end with no effort. Fast. Reusable. Easy to use. The next generation framework for Node.js built on top of Koa. http://strapi.io/ Node.js – from the Beginning strapi 16-01-15
  • 35. Page 35 strapi Node.js – from the Beginning16-01-15
  • 36. Page 36 strapi Node.js – from the Beginning16-01-15
  • 37. Page 37 strapi Node.js – from the Beginning16-01-15
  • 38. Page 3816-01-15 Node.js – from the Beginning That‘s it  Thank you very much for listening robert.prediger@web4biz.de Sourcecode:https://github.com/web4biz/Node.js-FromTheBeginning

Editor's Notes

  1. Node.js, browsers, mobile, angular, jquery, cordova, gulp, grunt, tessel,
  2. pm2 express socket.io restify q (promises) async debug winston