SlideShare une entreprise Scribd logo
1  sur  22
NODE.JS
WEB/DB/HOSTING
       허광남
   kenu@okjsp.pe.kr
NODE.JS WEB FRAMEWORK
      http://expressjs.com/
EXPRESS WEB FRAMEWORK

• Insanely     fast (and small)

• server-side     JavaScript web development framework

• built   on

  • [node](http://nodejs.org)

  • [Connect](http://github.com/senchalabs/connect)
var app = express.createServer();



app.get('/', function(req, res){

      res.send('Hello World');

});



app.listen(3000);
INSTALL



npm install express

npm install -g express
QUICK START


• Create   the app:

 •$   npm install -g express

 •$   express /tmp/foo && cd /tmp/foo
QUICK START

• Install   dependencies:

  •$   npm install -d



• Start     the server:

  •$   node app.js
STRUCTURE
FEATURES


* Robust routing
* Redirection helpers
* Dynamic view helpers
* Content negotiation
* Focus on high performance
* View rendering and partials support
FEATURES


* Environment based configuration
* Session based flash notifications
* Built on [Connect](http://github.com/senchalabs/connect)
* High test coverage
* Executable for generating applications quickly
* Application level view options
FEATURES
                VIA CONNECT
* Session support
* Cache API
* Mime helpers
* ETag support
* Persistent flash notifications
* Cookie support
* JSON-RPC
* Logging
* and _much_ more!
DEMO



• express   install && run
NODE.JS IN HOSTING
    http://www.heroku.com
HOSTING PAAS

• joyent

• heroku

• nodester

• cloud    foundry

• node    socket

• nodejitsu
HOSTING IAAS


• Amazon     EC2

• Rackspace

• joyent   cloud
HEROKU


• http://www.heroku.com/

• heroku   client

• foreman

• git
• Windows    xp DEMO

• http://devcenter.heroku.com/categories/node-js

 • foreman   .net framework v4.0.30319

 • http://msdn.microsoft.com/en-us/netframework/
  aa569263.aspx
NODE.JS WITH DB
https://github.com/sidorares/nodejs-mysql-native
MYSQL-NATIVE



• npm   install mysql-native
nodepad mysqltest.js
var db = require("mysql-native").createTCPClient();
db.auto_prepare = true;
function dump_rows(cmd)
{
    cmd.addListener('row', function(r) { console.dir(r); } );
}


db.auth("nodesample", "nodeuser", "password");
dump_rows(db.query("select 1+1,2,3,'4',length('hello')"));
dump_rows(db.execute("select 1+1,2,3,'4',length(?)", ["hello"]));
db.close();
• MySql   protocol documentation:

 • http://forge.mysql.com/wiki/
  MySQL_Internals_ClientServer_Protocol

• Other   node.js mysql clients:

 • http://github.com/felixge/node-mysql

 • http://github.com/Sannis/node-mysql-libmysqlclient

 • http://github.com/Guille/node.dbslayer.js
REFERENCES

• Node    Guide 번역

 • http://nodeguide.atelier.weaveus.com/

• Node.js   호스팅

 • http://inspiredjw.tistory.com/2

• Node.js   기술 요약 정리
 •   http://www.webresourcesdepot.com/the-awesome-node-js-and-its-gang/

Contenu connexe

Tendances

Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
Sang Cù
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
ji guang
 
NodeWay in my project & sails.js
NodeWay in my project & sails.jsNodeWay in my project & sails.js
NodeWay in my project & sails.js
Dmytro Ovcharenko
 

Tendances (20)

Sails.js Model / ORM introduce
Sails.js Model / ORM introduceSails.js Model / ORM introduce
Sails.js Model / ORM introduce
 
CloudFoundry@home
CloudFoundry@homeCloudFoundry@home
CloudFoundry@home
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
Production Ready Javascript With Grunt
Production Ready Javascript With GruntProduction Ready Javascript With Grunt
Production Ready Javascript With Grunt
 
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLTWindows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
 
Node intro
Node introNode intro
Node intro
 
NodeJS: n00b no more
NodeJS: n00b no moreNodeJS: n00b no more
NodeJS: n00b no more
 
CasperJS
CasperJSCasperJS
CasperJS
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
 
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
 
NodeWay in my project & sails.js
NodeWay in my project & sails.jsNodeWay in my project & sails.js
NodeWay in my project & sails.js
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with Grunt
 
Async Web and Python
Async Web and PythonAsync Web and Python
Async Web and Python
 
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
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
 

En vedette (7)

Build web application with express
Build web application with expressBuild web application with express
Build web application with express
 
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
 
Developer paradigm shift
Developer paradigm shiftDeveloper paradigm shift
Developer paradigm shift
 
오픈소스 개요
오픈소스 개요오픈소스 개요
오픈소스 개요
 
소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategy소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategy
 
Social Dev Trend
Social Dev TrendSocial Dev Trend
Social Dev Trend
 
Elastic stack
Elastic stackElastic stack
Elastic stack
 

Similaire à Nodejs web,db,hosting

Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
Mohammad Qureshi
 
Kraken
KrakenKraken
Kraken
PayPal
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
Akshaya Mahapatra
 

Similaire à Nodejs web,db,hosting (20)

Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Node.js on Azure
Node.js on AzureNode.js on Azure
Node.js on Azure
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Kraken
KrakenKraken
Kraken
 
Node azure
Node azureNode azure
Node azure
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
AWS as platform for scalable applications
AWS as platform for scalable applicationsAWS as platform for scalable applications
AWS as platform for scalable applications
 
Kraken Front-Trends
Kraken Front-TrendsKraken Front-Trends
Kraken Front-Trends
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 

Plus de Kenu, GwangNam Heo

모바일 웹앱 프로그래밍 과정
모바일 웹앱 프로그래밍 과정모바일 웹앱 프로그래밍 과정
모바일 웹앱 프로그래밍 과정
Kenu, GwangNam Heo
 
JavaScript 2014 프론트엔드 기술 리뷰
JavaScript 2014 프론트엔드 기술 리뷰JavaScript 2014 프론트엔드 기술 리뷰
JavaScript 2014 프론트엔드 기술 리뷰
Kenu, GwangNam Heo
 
01이제는 모바일 세상이다
01이제는 모바일 세상이다01이제는 모바일 세상이다
01이제는 모바일 세상이다
Kenu, GwangNam Heo
 
무료클라우드호스팅
무료클라우드호스팅무료클라우드호스팅
무료클라우드호스팅
Kenu, GwangNam Heo
 

Plus de Kenu, GwangNam Heo (20)

이클립스 플랫폼
이클립스 플랫폼이클립스 플랫폼
이클립스 플랫폼
 
About Programmer 2021
About Programmer 2021About Programmer 2021
About Programmer 2021
 
채팅 소스부터 Https 주소까지
채팅 소스부터  Https 주소까지채팅 소스부터  Https 주소까지
채팅 소스부터 Https 주소까지
 
Java in 2 hours
Java in 2 hoursJava in 2 hours
Java in 2 hours
 
Dev team chronicles
Dev team chroniclesDev team chronicles
Dev team chronicles
 
개발자가 바라보는 자바의 미래 - 2018
개발자가 바라보는 자바의 미래 - 2018개발자가 바라보는 자바의 미래 - 2018
개발자가 바라보는 자바의 미래 - 2018
 
오픈 소스 사용 매뉴얼
오픈 소스 사용 매뉴얼오픈 소스 사용 매뉴얼
오픈 소스 사용 매뉴얼
 
about Programmer 2018
about Programmer 2018about Programmer 2018
about Programmer 2018
 
Cloud developer evolution
Cloud developer evolutionCloud developer evolution
Cloud developer evolution
 
Social Coding GitHub 2015
Social Coding GitHub 2015Social Coding GitHub 2015
Social Coding GitHub 2015
 
오픈소스 개발도구 2014
오픈소스 개발도구 2014오픈소스 개발도구 2014
오픈소스 개발도구 2014
 
Mean stack Start
Mean stack StartMean stack Start
Mean stack Start
 
모바일 웹앱 프로그래밍 과정
모바일 웹앱 프로그래밍 과정모바일 웹앱 프로그래밍 과정
모바일 웹앱 프로그래밍 과정
 
JavaScript 2014 프론트엔드 기술 리뷰
JavaScript 2014 프론트엔드 기술 리뷰JavaScript 2014 프론트엔드 기술 리뷰
JavaScript 2014 프론트엔드 기술 리뷰
 
jQuery 구조와 기능
jQuery 구조와 기능jQuery 구조와 기능
jQuery 구조와 기능
 
01이제는 모바일 세상이다
01이제는 모바일 세상이다01이제는 모바일 세상이다
01이제는 모바일 세상이다
 
Eclipse code quality
Eclipse code qualityEclipse code quality
Eclipse code quality
 
"협동조합, 참 좋다" 독후감
"협동조합, 참 좋다" 독후감"협동조합, 참 좋다" 독후감
"협동조합, 참 좋다" 독후감
 
무료클라우드호스팅
무료클라우드호스팅무료클라우드호스팅
무료클라우드호스팅
 
프로그래머
프로그래머프로그래머
프로그래머
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Nodejs web,db,hosting

  • 1. NODE.JS WEB/DB/HOSTING 허광남 kenu@okjsp.pe.kr
  • 2. NODE.JS WEB FRAMEWORK http://expressjs.com/
  • 3. EXPRESS WEB FRAMEWORK • Insanely fast (and small) • server-side JavaScript web development framework • built on • [node](http://nodejs.org) • [Connect](http://github.com/senchalabs/connect)
  • 4. var app = express.createServer(); app.get('/', function(req, res){ res.send('Hello World'); }); app.listen(3000);
  • 5. INSTALL npm install express npm install -g express
  • 6. QUICK START • Create the app: •$ npm install -g express •$ express /tmp/foo && cd /tmp/foo
  • 7. QUICK START • Install dependencies: •$ npm install -d • Start the server: •$ node app.js
  • 9. FEATURES * Robust routing * Redirection helpers * Dynamic view helpers * Content negotiation * Focus on high performance * View rendering and partials support
  • 10. FEATURES * Environment based configuration * Session based flash notifications * Built on [Connect](http://github.com/senchalabs/connect) * High test coverage * Executable for generating applications quickly * Application level view options
  • 11. FEATURES VIA CONNECT * Session support * Cache API * Mime helpers * ETag support * Persistent flash notifications * Cookie support * JSON-RPC * Logging * and _much_ more!
  • 12. DEMO • express install && run
  • 13. NODE.JS IN HOSTING http://www.heroku.com
  • 14. HOSTING PAAS • joyent • heroku • nodester • cloud foundry • node socket • nodejitsu
  • 15. HOSTING IAAS • Amazon EC2 • Rackspace • joyent cloud
  • 16. HEROKU • http://www.heroku.com/ • heroku client • foreman • git
  • 17. • Windows xp DEMO • http://devcenter.heroku.com/categories/node-js • foreman .net framework v4.0.30319 • http://msdn.microsoft.com/en-us/netframework/ aa569263.aspx
  • 19. MYSQL-NATIVE • npm install mysql-native
  • 20. nodepad mysqltest.js var db = require("mysql-native").createTCPClient(); db.auto_prepare = true; function dump_rows(cmd) { cmd.addListener('row', function(r) { console.dir(r); } ); } db.auth("nodesample", "nodeuser", "password"); dump_rows(db.query("select 1+1,2,3,'4',length('hello')")); dump_rows(db.execute("select 1+1,2,3,'4',length(?)", ["hello"])); db.close();
  • 21. • MySql protocol documentation: • http://forge.mysql.com/wiki/ MySQL_Internals_ClientServer_Protocol • Other node.js mysql clients: • http://github.com/felixge/node-mysql • http://github.com/Sannis/node-mysql-libmysqlclient • http://github.com/Guille/node.dbslayer.js
  • 22. REFERENCES • Node Guide 번역 • http://nodeguide.atelier.weaveus.com/ • Node.js 호스팅 • http://inspiredjw.tistory.com/2 • Node.js 기술 요약 정리 • http://www.webresourcesdepot.com/the-awesome-node-js-and-its-gang/

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n