It almost feels like traveling through time machine, too many things have changed over the past two years. Node was forked into io.js and ES6 has been out and getting traction. And there are new frameworks out each week. Frontend engineers must have been having a tough life to keep up, and tons of fun as well.
Here I just keep some book notes for my reading through the book "Node.js in Action". The book itself turned out to be a bit outdated, but many basics are still valid. There is also another more recent Manning book "Node.js in Practice".
Difference between exports and module.exports
exports is a reference to module.exports, so as long as you do not reassign it to something different, they are the same.
Module search sequence
search for node_modules recursively from current directory, if not found, then search for environment variable NODE_MODULE or NODE_PATH.
Module require search sequence
Search for index.js, then inside package.json to find the "main" definition.
Flow control libraries
nimble: https://github.com/caolan/nimble
See article for a discussion about how to handle async programming with JavaScript: How to survive asynchronous programming in JavaScript
unit test frameworks
nodeunit: https://github.com/caolan/nodeunit
mocha: http://mochajs.org
vows: http://vowsjs.org
should.js: assertion lib: https://github.com/tj/should.js/
functional test frameworks
Keep app running/restart
monit: https://mmonit.com/monit/
forever: https://github.com/foreverjs/forever
upstart: http://upstart.ubuntu.com/index.html
Node Web frameworks, so many of them
Express: http://expressjs.com
Hapi from walmartlabs: http://hapijs.com
A good intro about why Hapi was created: http://hueniverse.com/2012/12/20/hapi-a-prologue/
Kraken from paypal: http://krakenjs.com
Restify: http://mcavage.me/node-restify/
Koa, next gen Node Web framework using ES6: http://koajs.com
LoopBack: http://loopback.io
Sailsjs, MVC pattern similar to RoR: http://sailsjs.org
Meteor: https://www.meteor.com
Quite in depth comparison of Express, Koa and hapi: https://www.airpair.com/node.js/posts/nodejs-framework-comparison-express-koa-hapi
hapi vs Express: http://megagalactic.io/hapi-vs-express/
Express, hapi, Sails: http://blog.pluralsight.com/node-web-frameworks
Performance comparison of Express, hapi, and Restify: https://raygun.io/blog/2015/03/node-performance-hapi-express-js-restify/
Awesome work man, you are truly a messiah for many people. Please keep doing the incredible work that you do and keep simplifying other people lives. Thumbs Up !!
ReplyDeleteI was searching for the matter you shared through blog. It is quite interesting and obviously very informative for me. Thanks you very much! Nonton Drama Korea
ReplyDeleteThanks for sharing this informative post. Looking forward to read more.
ReplyDeleteBest Web Design and Development Company
Node.Js development has become very popular over the last four years and continues to stand the competition in 2021, making startups worldwide choose it over other available options.
ReplyDeleteDark Bears is the top Mobile App Development Company in USA.
Hire node js experts from Dark Bears and infuse Nodejs in your business better experience.
I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
ReplyDeletelinen sarees
silk cotton sarees
dhoti for men
silk shirts for men
designer silk sarees