• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Nodejs web,db,hosting
 

Nodejs web,db,hosting

on

  • 1,973 views

 

Statistics

Views

Total Views
1,973
Views on SlideShare
1,942
Embed Views
31

Actions

Likes
2
Downloads
25
Comments
1

1 Embed 31

http://airlueos.tistory.com 31

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Nodejs web,db,hosting Nodejs web,db,hosting Presentation Transcript

  • NODE.JSWEB/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);
  • INSTALLnpm install expressnpm 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 DBhttps://github.com/sidorares/nodejs-mysql-native
  • MYSQL-NATIVE• npm install mysql-native
  • nodepad mysqltest.jsvar 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/