SlideShare a Scribd company logo
1 of 24
Download to read offline
Quinta-feira, 22 de Agosto de 13
Agenda
Node.js
About
Beneļ¬ts
Installing
NPM
Express
About
Installing Express & Generate an app
Jade & Stylus
Quinta-feira, 22 de Agosto de 13
about me
15 years programming experience
Software Developer and MSSQL DBA @ Com-
UT/Sedimap
using Node.js about 3 years
Quinta-feira, 22 de Agosto de 13
NODE.JS
Quinta-feira, 22 de Agosto de 13
Node -About
Node.js is a platform to build fast and scalable
network applications
we know this can be very painful and hard in some languages
Quinta-feira, 22 de Agosto de 13
Node -About
It is built on GoogleV8 JavaScript engine, the libuv
platform abstraction layer and a core library, which is
itself primarily written in JavaScript.
perhaps the best and faster JavaScript engine...
Quinta-feira, 22 de Agosto de 13
Node -About
event-driven
deļ¬ned as an application technique in which the
application has a main loop
non-blocking I/O
is a form of I/O processing that permits other processing to
continue before the last transmission has ļ¬nished
Quinta-feira, 22 de Agosto de 13
Quinta-feira, 22 de Agosto de 13
Node - Benefits
Small Core
Multi-Platform
implements some CommonJS speciļ¬cations
Easy to use, easy to start
JavaScript on server, JavaScript on client
Single thread simpliļ¬es concurrency
Package Module (NPM)
Community
Great Modules (like underscore, async, express, request, etc...)
Rapidly changing, e.g., updating in shortly time
Quinta-feira, 22 de Agosto de 13
Installing Node
Go to http://nodejs.org/
Windons and Mac OS X click on ā€œinstallā€
Linux, using package manager
Gentoo, Ubuntu, Fedora, etc...
Quinta-feira, 22 de Agosto de 13
Installing Node(Cont.)
Install from source code
wget http://nodejs.org/dist/v0.10.x/node-v0.10.x.tar.gz
tar xzf node-v0.10x.tar.gz
./conļ¬gure
make
make test
make install
node --version
Quinta-feira, 22 de Agosto de 13
NPM
How to ļ¬nd a module
npm search express
https://npmjs.org/
Some attentions you need to take before install a module
were updated relatively recently
have github repositories linked
have READMEs with good documentation
have at least some number of people instaling them every
week
are liberally licensed (feel free to use)
Quinta-feira, 22 de Agosto de 13
Installing a module
Global Mode
will install in /usr/local/lib/node_modules
is more suited for modules that should always be available
Local Mode
NPM default mode
ā€œyour application pathā€/node_modules
is ideal for installing the modules your applications depends
donā€™t affect others applications that you have installed
use always this mode is more safe
Quinta-feira, 22 de Agosto de 13
Letā€™s Play
with a
TCP Server
Chat
Quinta-feira, 22 de Agosto de 13
EXPRESS
Quinta-feira, 22 de Agosto de 13
About
is a minimal and ļ¬‚exible web application
framework
provide a robust set of features for building
single, multi-page and hybrid web applications
is based on the Connect middleware
and implements MVC
Quinta-feira, 22 de Agosto de 13
Installing & Generate an
app
sudo npm install -g express
express --sessions --css stylus myapp
cd myapp & npm install
node app
Quinta-feira, 22 de Agosto de 13
Express - app
package.json (some app
settings)
app.js (launch app)
public/*
routes/*
views/*
Quinta-feira, 22 de Agosto de 13
Jade
is a high performance template engine
implemented with JavaScript for node
Quinta-feira, 22 de Agosto de 13
H
T
M
L
J
A
D
E
Quinta-feira, 22 de Agosto de 13
Stylus
robust, feature-rich CSS language built
for node
providing an efļ¬cient, dynamic and
expressive way to generate CSS
Quinta-feira, 22 de Agosto de 13
CSS
Stylus
Quinta-feira, 22 de Agosto de 13
Some Resources
Node.JS
http://nodeguide.com/ (Felix Geisendƶrfer)
https://github.com/maxogden/art-of-node (Max Ogden)
http://nodetuts.com(Pedro Teixeira)
Express
http://expressjs.com/
http://www.senchalabs.org/connect/
http://learnboost.github.io/stylus/
http://jade-lang.com/
Quinta-feira, 22 de Agosto de 13
Quinta-feira, 22 de Agosto de 13

More Related Content

What's hot

Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup Slides
Makoto Inoue
Ā 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And Workflow
Dr Nic Williams
Ā 

What's hot (20)

Production ready Vert.x
Production ready Vert.xProduction ready Vert.x
Production ready Vert.x
Ā 
Daniel Steigerwald: EsteJS - javascriptovĆ© aplikace robusně, modulĆ”rně a komf...
Daniel Steigerwald: EsteJS - javascriptovĆ© aplikace robusně, modulĆ”rně a komf...Daniel Steigerwald: EsteJS - javascriptovĆ© aplikace robusně, modulĆ”rně a komf...
Daniel Steigerwald: EsteJS - javascriptovĆ© aplikace robusně, modulĆ”rně a komf...
Ā 
Work smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph CintraWork smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph Cintra
Ā 
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
Ā 
What's New in ASP.NET Core 3
What's New in ASP.NET Core 3What's New in ASP.NET Core 3
What's New in ASP.NET Core 3
Ā 
Node js meetup
Node js meetupNode js meetup
Node js meetup
Ā 
Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup Slides
Ā 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJS
Ā 
Vuejs and Web components - current state
Vuejs and Web components - current stateVuejs and Web components - current state
Vuejs and Web components - current state
Ā 
Front-end tools in java webapps
Front-end tools in java webappsFront-end tools in java webapps
Front-end tools in java webapps
Ā 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
Ā 
Whats new in .net core 3
Whats new in .net core 3Whats new in .net core 3
Whats new in .net core 3
Ā 
Using PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to dateUsing PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to date
Ā 
Running Java In Smalltalk
Running Java In SmalltalkRunning Java In Smalltalk
Running Java In Smalltalk
Ā 
TDD with Spock @xpdays_ua
TDD with Spock @xpdays_uaTDD with Spock @xpdays_ua
TDD with Spock @xpdays_ua
Ā 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
Ā 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteer
Ā 
Scripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeScripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 Prelude
Ā 
Think beyond http
Think beyond httpThink beyond http
Think beyond http
Ā 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And Workflow
Ā 

Similar to Node.js and express

Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
lubnayasminsebl
Ā 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
gulfam ali
Ā 

Similar to Node.js and express (20)

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
Ā 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
Ā 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Ā 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
Ā 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
Ā 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Ā 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
Ā 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
Ā 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
Ā 
Node js
Node jsNode js
Node js
Ā 
Nodejs
NodejsNodejs
Nodejs
Ā 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
Ā 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
Ā 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
Ā 
Serverless java
Serverless   javaServerless   java
Serverless java
Ā 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
Ā 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
Ā 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
Ā 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
Ā 
Node.js security tour
Node.js security tourNode.js security tour
Node.js security tour
Ā 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Ā 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Ā 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Ā 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Ā 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Ā 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Ā 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Ā 

Node.js and express

  • 1. Quinta-feira, 22 de Agosto de 13
  • 2. Agenda Node.js About Beneļ¬ts Installing NPM Express About Installing Express & Generate an app Jade & Stylus Quinta-feira, 22 de Agosto de 13
  • 3. about me 15 years programming experience Software Developer and MSSQL DBA @ Com- UT/Sedimap using Node.js about 3 years Quinta-feira, 22 de Agosto de 13
  • 5. Node -About Node.js is a platform to build fast and scalable network applications we know this can be very painful and hard in some languages Quinta-feira, 22 de Agosto de 13
  • 6. Node -About It is built on GoogleV8 JavaScript engine, the libuv platform abstraction layer and a core library, which is itself primarily written in JavaScript. perhaps the best and faster JavaScript engine... Quinta-feira, 22 de Agosto de 13
  • 7. Node -About event-driven deļ¬ned as an application technique in which the application has a main loop non-blocking I/O is a form of I/O processing that permits other processing to continue before the last transmission has ļ¬nished Quinta-feira, 22 de Agosto de 13
  • 8. Quinta-feira, 22 de Agosto de 13
  • 9. Node - Benefits Small Core Multi-Platform implements some CommonJS speciļ¬cations Easy to use, easy to start JavaScript on server, JavaScript on client Single thread simpliļ¬es concurrency Package Module (NPM) Community Great Modules (like underscore, async, express, request, etc...) Rapidly changing, e.g., updating in shortly time Quinta-feira, 22 de Agosto de 13
  • 10. Installing Node Go to http://nodejs.org/ Windons and Mac OS X click on ā€œinstallā€ Linux, using package manager Gentoo, Ubuntu, Fedora, etc... Quinta-feira, 22 de Agosto de 13
  • 11. Installing Node(Cont.) Install from source code wget http://nodejs.org/dist/v0.10.x/node-v0.10.x.tar.gz tar xzf node-v0.10x.tar.gz ./conļ¬gure make make test make install node --version Quinta-feira, 22 de Agosto de 13
  • 12. NPM How to ļ¬nd a module npm search express https://npmjs.org/ Some attentions you need to take before install a module were updated relatively recently have github repositories linked have READMEs with good documentation have at least some number of people instaling them every week are liberally licensed (feel free to use) Quinta-feira, 22 de Agosto de 13
  • 13. Installing a module Global Mode will install in /usr/local/lib/node_modules is more suited for modules that should always be available Local Mode NPM default mode ā€œyour application pathā€/node_modules is ideal for installing the modules your applications depends donā€™t affect others applications that you have installed use always this mode is more safe Quinta-feira, 22 de Agosto de 13
  • 14. Letā€™s Play with a TCP Server Chat Quinta-feira, 22 de Agosto de 13
  • 16. About is a minimal and ļ¬‚exible web application framework provide a robust set of features for building single, multi-page and hybrid web applications is based on the Connect middleware and implements MVC Quinta-feira, 22 de Agosto de 13
  • 17. Installing & Generate an app sudo npm install -g express express --sessions --css stylus myapp cd myapp & npm install node app Quinta-feira, 22 de Agosto de 13
  • 18. Express - app package.json (some app settings) app.js (launch app) public/* routes/* views/* Quinta-feira, 22 de Agosto de 13
  • 19. Jade is a high performance template engine implemented with JavaScript for node Quinta-feira, 22 de Agosto de 13
  • 21. Stylus robust, feature-rich CSS language built for node providing an efļ¬cient, dynamic and expressive way to generate CSS Quinta-feira, 22 de Agosto de 13
  • 23. Some Resources Node.JS http://nodeguide.com/ (Felix Geisendƶrfer) https://github.com/maxogden/art-of-node (Max Ogden) http://nodetuts.com(Pedro Teixeira) Express http://expressjs.com/ http://www.senchalabs.org/connect/ http://learnboost.github.io/stylus/ http://jade-lang.com/ Quinta-feira, 22 de Agosto de 13
  • 24. Quinta-feira, 22 de Agosto de 13