↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

How to Become a Better Node.js Developer in 2016

The page gathers practical advice for Node.js work across development and operations. It recommends ES2015, a callback interface with Promise support, careful error handling, a standard code style, monitoring, automation, current Node.js releases, and regular dependency updates.

Reading notes
#

  • Use ES2015 features that are available in the latest stable Node.js version, and avoid compiling source on the server side when possible.
  • Expose modules with an error-first callback interface and Promise support so they stay compatible with older and newer code.
  • Distinguish programmer errors from operational errors, crash immediately on bugs, and handle callback errors explicitly.
  • Add a final catch to Promise chains so later errors are not lost.
  • Prefer JavaScript Standard Style for simple code style rules without project-specific configuration.
  • Follow the Twelve-Factor Application manifesto for web applications.
  • Start new projects with npm init, or npm init –yes to accept defaults.
  • Monitor applications with tools such as Zabbix, Collectd, ElasticSearch, Logstash, or Trace.
  • Automate work with build tools such as Grunt, Gulp, and Webpack.
  • Use the latest LTS Node.js version, and use nvm when different projects need different versions.
  • Update dependencies weekly with npm outdated or ncu.
  • Choose a database based on the data shape, transactions, and retention needs.
  • Use Semantic Versioning and semantic-release to automate module releases.
  • Keep up with Node.js and JavaScript news by subscribing to the listed media.