7 ms·
ExpressJS 4.0 has been released
- beck5 13y agoExpress has been at the core of everything we have done, a great little framework. Going forward though its worth keeping an eye on http://koajs.com http://koajs.com, like express it is built by visionmedia/tj but uses the new generators that are starting to become available in node.
- ika 13y agoI really like this new http://expressjs.com/4x/api.html#router http://expressjs.com/4x/api.html#router feature. This will help me build better architecture for application on top of express
- deleted 13y ago[deleted]
- zzzaim 13y agoAnd here are the new features in Express 4.x: https://github.com/visionmedia/express/wiki/New-features-in-4.x https://github.com/visionmedia/express/wiki/New-features-in-...
- deleted 13y ago[deleted]
- fauria 13y agoNice guide on Express 4: http://scotch.io/bar-talk/expressjs-4-0-new-features-and-upgrading-from-3-0 http://scotch.io/bar-talk/expressjs-4-0-new-features-and-upg...
- bright_day 13y agofinally i am really excited
- Jacqued 13y agoThe changes make express even cleaner than before. The new routing system, allowing handling different verbs with chained functions, is pretty slick. Also, decoupling default middleware and putting them into their own modules seems like the way to go, and more 'node-y' than packing everything together. I'll be glad to get rid of the connect warnings too ! Although there's koajs, it's nice to see express is still getting some love
- batuhanicoz 13y agoI have been looking/thinking for the best way to implement something like the new Router functionality for 3 days now. This is very good news for me. Also, how to migrate guide can be found here: https://github.com/visionmedia/express/wiki/Migrating%20from%203.x%20to%204.x https://github.com/visionmedia/express/wiki/Migrating%20from...
- nailer 13y agoI love you Express, but my next project is going to be based on TJ's own Express successor: http://koajs.com/ http://koajs.com/
- alessioalex 13y agoThat's not a successor, it's a different framework based on generators. It's not as if it was Express 5.x or something.
- benesch 13y agoFrom the Koa homepage: > Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation I think he meant successor in the spiritual sense, which is undeniably true.
- ulisesrmzroche 13y agoIt's going to be an even bigger hit than express, for sure.
- nailer 13y agoI've been playing with 'Co', the thunk / flow control framework TJ uses for Koa: #!/usr/bin/env node --harmony var fs = require('fs'), co = require('co'), thunkify = require('thunkify'), request = require('request'), readFile = thunkify(fs.readFile); get = thunkify(request.get); var log = console.log.bind(console); // Create a thunk, and run it immediately. co(function *(){ try { var fileContents = yield readFile('myfile', 'utf8'); log(fileContents); var yahoo = (yield get('http://yahoo.com'))[0]; log(yahoo.statusCode) } catch(error) { log('Oh no, an error!') log(error.code) } })() Async, inline, catching errors. It's nice.
- ulisesrmzroche 13y agoYeah, once you start using yield it's really hard to write JS without it. It's nice to get that keyword back. You can start throwing that on mocha too, it's pretty sweet.
- jamescun 13y agoI love the new Router design, but I mainly use Restify[1] to build REST APIs for SPAs. How easy would it be to use port Express's new Router to Restify? [1] https://github.com/mcavage/node-restify https://github.com/mcavage/node-restify
- deleted 13y ago[deleted]
- ollysb 13y agoI had a play with express/node a whole back but found it quite low level (useful in some cases). Is there anything closer to rails in node or is there a preference for piecing everything together with libraries?
- jahansafd 13y agotake a look into Sail.js, Meteor.js or the MEAN stack http://sailsjs.org/# http://sailsjs.org/#! https://www.meteor.com/ https://www.meteor.com/ http://www.mean.io/#!/ http://www.mean.io/#!/
- sehr 13y agoThe node.js community seems very unixy, small modules pieced together is the name of the game.
- iLoch 13y agoAs Jahansafd said, Sails.js is probably the most popular right now. It's a full MVC framework built on top of Express. It's constantly being improved, there's commits nearly every day.
- srgpqt 13y agoTower http://tower.github.io/ http://tower.github.io/
- rubiquity 13y agoDoes anyone know where I can find discussion about the Express team's decision to completely detach from connect? I'm also curious about what type of middleware design they went with, or if they just reimplemented connect in their own way, which wouldn't surprise me due to the prevalence of Not Invented Here syndrome in the Node community.
- xGrill 13y agoFrom the migrating guide: "This change was made to allow for these [connect] middleware to receive fixes, updates, and releases without impacting express release cycles and vice versa."
- rubiquity 13y agoCouldn't they still achieve that by depending on connect, but not depending on those specific connect middlewares?
- mcantelon 13y agoTJ's one of the original creators of Connect, so it's unlikely to simply be NIH.
- jongleberry 13y agoconnect is basically just a `.use()` kernel, and express' router was just mounted on this kernal. now, express' kernel combines connect's `.use()` kernel as well as the router, simplifying the entire middleware system internally and removing the need to do `app.use(app.router)`. i.e. you're no longer mounting the router on top of another kernel.
- jdc0589 13y agoVery cool. Interestingly enough, a lot of Express features are starting to align with Bogart (https://github.com/nrstott/bogart https://github.com/nrstott/bogart) features, and vice versa unintentionally.
- philjackson 13y agoThe latest commit message on (the now completely seperate) body-parser module is "asdf". Makes me nervous.
- codygman 13y agoBad commit messages are a big warning sign to me too.
- codygman 13y agoBad commit messages are a big warning sign to me too.
- codygman 13y agoBad commit messages are a big warning sign to me too.
- eogas 13y agoThat was the FIRST commit to that repo. Not that it's great reasoning, but really how much info does 'Initial commit.' convey as opposed to 'asdf'?
- philjackson 13y agoFor a start it would have stopped me mistaking the first commit for the last commit. More importantly, where you see the commit message next to lines of code[1], "initial commit" hints that you can assume the line came with an import or boilerplate. 1. https://github.com/expressjs/body-parser/blame/master/index.js https://github.com/expressjs/body-parser/blame/master/index....
- djjaxe 13y agoIf you clicked on the 86446f74 You would have gotten: https://github.com/expressjs/body-parser/commit/86446f74d5c6bdb90b762a094b857bc0a340966b https://github.com/expressjs/body-parser/commit/86446f74d5c6... Which shows parents 0
- gexla 13y ago
- jpdlla 13y agoIf you're also wondering about what the changes were for 4.0 https://github.com/visionmedia/express/blob/master/History.md#400--2014-04-09 https://github.com/visionmedia/express/blob/master/History.m...
- kayoone 13y agoPartly unrelated but i have read strong evidence[1] suggesting that the ExpressJS author (TJ) does not even exist as a real person and is an entirely constructed online identity who is portrayed by different people. Not that it matters too much though, still interesting ;) [1] http://www.quora.com/TJ-Holowaychuk-1/How-is-TJ-Holowaychuk-so-insanely-productive http://www.quora.com/TJ-Holowaychuk-1/How-is-TJ-Holowaychuk-...
- base698 13y agoI met him once at a Node.JS bar/podcast talk about 2 years ago. He looks just like his Twitter picture. Could still be the figure head of a bunch of people I guess.
- camus2 13y agolol TJ is real and too smart for his own good;)
- tsenkov 13y agoTJ is working for Segment.IO: https://segment.io/team https://segment.io/team
- damon_c 13y agoSo productive... never posts on Hacker News... Hmmm...
- paulbaumgart 13y agoIs he also Satoshi Nakamoto?
- tegeek 13y agoAnother complete web framework in NodeJS world. http://www.partialjs.com/ http://www.partialjs.com/ Its a bit high level than Express but same performance wise. I like it becoz you get started in 2 minutes.
- iamartnez 13y agoOne thing express doesn't do is manage URLs for you. I wrote a simple module that does this[0]. It helps, especially when you have a large number of URLS. [0] https://github.com/artnez/urltree https://github.com/artnez/urltree
- sgy 13y agoMost of the middlewares (like logger) are no longer bundled with Express and must be installed separately. https://github.com/senchalabs/connect#middleware https://github.com/senchalabs/connect#middleware
- sgy 13y ago3.x to 4.x Migration guide: https://github.com/visionmedia/express/wiki/Migrating-from-3.x-to-4.x https://github.com/visionmedia/express/wiki/Migrating-from-3...
- findjashua 13y agoAny particular reason to choose Express over Koa?
- jongleberry 13y agonot really. use koa instead if you can. a lot of middleware hasn't been written for koa yet, so you might have to write your own.
- bricss 13y agoHapi.js to everyone http://spumko.github.io/ http://spumko.github.io/