Introducción a express - meetup node.js argentina

Introducción a express - meetup node.js argentina

1b5777e832ade40d30aa49ca48292404?s=128

Dan Zajdband

October 26, 2012
Tweet

Transcript

  1. Introducción a express

  2. Dan Zajdband

  3. @dzajdband

  4. zajdband.com.ar

  5. los-rayos.com.ar

  6. None
  7. La filosofía de node

  8. “Node.js has a relatively small core set of functionality. The

    general guideline is that node core contains everything that is strictly necessary to do network programming, and write userland modules.” @izs - node.js maintainer, npm creator
  9. require(‘http’)

  10. require(‘http’).createServer(function(req, res){ res.writeHead(200, {‘Content-Type’: ‘text/plain’}); res.end(‘Piojo Lopez\n’); }).listen(3000);

  11. npm install express

  12. • Powered by Connect • Middleware • Routing • HTTP

    helpers • Liviano • Soporta +14 template engines
  13. None
  14. npm install -g express

  15. None
  16. NODE_ENV=development

  17. None
  18. lluvia de módulos

  19. • Socket.IO (https://github.com/LearnBoost/ socket.io) • Passport (https://github.com/jaredhanson/passport) • Mongoose (https://github.com/LearnBoost/

    mongoose) • Redis (https://github.com/mranney/node_redis) • Superagent (https://github.com/visionmedia/ superagent)
  20. • Up (https://github.com/LearnBoost/up) • bcrypt (https://github.com/ncb000gt/ node.bcrypt.js/) • Oauth (https://github.com/ciaranj/node-oauth)

    • nodemailer (https://github.com/andris9/ Nodemailer) • Jade (https://github.com/visionmedia/jade)
  21. Bonus track

  22. components

  23. client-side package manager

  24. • Componentes modulares • No solo para javascript • templates

    • Extensible • Resuelve dependencias • Rápido (mucho más que, por ejemplo, npm)
  25. follow @component_js