R a q u e l G u i m a r ã e s
MERGULHANDO NO TECH RADAR: NODE.JS
II Encontro Nacional de Mulheres na TecnologiaGoiânia, 29 de março de 2014
2
thoughtworks.com/radar
3
4
/joyent/node
5
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
6
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
7
var http = require('http');
http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.write('Hello World\n'); res.end();}).listen(1337);
console.log('Server running at http://localhost:1337/');
$ node server.jsServer running at http://localhost:1337/
8
64 799 módulos
7 531 650 downloads no último dia
48 208 781 downloads na última semana
173 477 733 downloads no último mês
9
var express = require(“express”);var app = express();
app.get(“/about”, function(req, res) {res.render(“about”)
});
app.listen(8080);
Callbacks assíncronos baseados em eventos
10
TESTANDO
DEPLOY
11
+
+ forever
QUANDO USAR?
12
▫︎API Json
▫︎ Páginas únicas com muito Ajax (ex: gmail like)
▫︎ Streaming
▫︎Aplicações real-time (ex: chats)
▫︎ ...
OBRIGADA
raquelguimaraes.com
raquelguimaraes
Top Related