Software Alternatives & Reviews

Node.js best practices list (July 2021)

Standard JS Snyk Prettier PM2 Mochajs Jenkins ExpressJS ESLint CodeClimate CircleCI
  1. DevOps, Build, Test, Deploy, and Code Review
    Pricing:
    • Open Source
    TL;DR: Use ESLint to gain awareness about separation concerns. Prettier or Standardjs can automatically resolve these issues.

    #Social Networks #Code Coverage #Code Collaboration 26 social mentions

  2. 2
    Snyk helps you use open source and stay secure. Continuously find and fix vulnerabilities for npm, Maven, NuGet, RubyGems, PyPI and much more.
    Pricing:
    • Open Source
    TL;DR: Even the most reputable dependencies such as Express have known vulnerabilities. This can get easily tamed using community and commercial tools such as 🔗 npm audit and 🔗 snyk.io that can be invoked from your CI on every build.

    #Security #Security Monitoring #Security CI 85 social mentions

  3. An opinionated code formatter
    Pricing:
    • Open Source
    TL;DR: Use ESLint to gain awareness about separation concerns. Prettier or Standardjs can automatically resolve these issues.

    #Developer Tools #Code Analysis #JavaScript Framework 255 social mentions

  4. 4

    PM2

    Advanced, production process manager for Node.js
    TL;DR: When an unknown error occurs (a developer error, see best practice 2.3) - there is uncertainty about the application healthiness. Common practice suggests restarting the process carefully using a process management tool like Forever or PM2.

    #Monitoring Tools #Performance Monitoring #Log Management 50 social mentions

  5. Mocha is a JavaScript test framework running on Node.js and the browser, making asynchronous testing simple.
    Pricing:
    • Open Source
    TL;DR: Different tests must run on different scenarios: quick smoke, IO-less, tests should run when a developer saves or commits a file, full end-to-end tests usually run when a new pull request is submitted, etc. This can be achieved by tagging tests with keywords like #cold #api #sanity so you can grep with your testing harness and invoke the desired subset. For example, this is how you would invoke only the sanity test group with Mocha: mocha --grep 'sanity'.

    #Development Tools #Javascript UI Libraries #JavaScript Framework 86 social mentions

  6. Jenkins is an open-source continuous integration server with 300+ plugins to support all kinds of software development
    Pricing:
    • Open Source
    TL;DR: Your continuous integration platform (CICD) will host all the quality tools (e.g. test, lint) so it should come with a vibrant ecosystem of plugins. Jenkins used to be the default for many projects as it has the biggest community along with a very powerful platform at the price of a complex setup that demands a steep learning curve. Nowadays, it has become much easier to set up a CI solution using SaaS tools like CircleCI and others. These tools allow crafting a flexible CI pipeline without the burden of managing the whole infrastructure. Eventually, it's a trade-off between robustness and speed - choose your side carefully.

    #DevOps Tools #Continuous Integration #Continuous Deployment 5 social mentions

  7. Sinatra inspired web development framework for node.js -- insanely fast, flexible, and simple
    Pricing:
    • Open Source
    TL;DR: Avoid the nasty habit of defining the entire Express app in a single huge file - separate your 'Express' definition to at least two files: the API declaration (app.js) and the networking concerns (WWW). For even better structure, locate your API declaration within components.

    #JavaScript Framework #Node.js Framework #Web Frameworks 423 social mentions

  8. 8
    The fully pluggable JavaScript code quality tool
    Pricing:
    • Open Source
    TL;DR: ESLint is the de-facto standard for checking possible code errors and fixing code style, not only to identify nitty-gritty spacing issues but also to detect serious code anti-patterns like developers throwing errors without classification. Though ESLint can automatically fix code styles, other tools like prettier and beautify are more powerful in formatting the fix and work in conjunction with ESLint.

    #Code Coverage #Developer Tools #Code Quality 228 social mentions

  9. Code Climate provides automated code review for your apps, letting you fix quality and security issues before they hit production. We check every commit, branch and pull request for changes in quality and potential vulnerabilities.
    Pricing:
    • Open Source
    TL;DR: Using static analysis tools helps by giving objective ways to improve code quality and keeps your code maintainable. You can add static analysis tools to your CI build to fail when it finds code smells. Its main selling points over plain linting are the ability to inspect quality in the context of multiple files (e.g. Detect duplications), perform advanced analysis (e.g. Code complexity), and follow the history and progress of code issues. Two examples of tools you can use are Sonarqube (2,600+ stars) and Code Climate (1,500+ stars).

    #Code Coverage #Code Quality #Code Analysis 11 social mentions

  10. CircleCI gives web developers powerful Continuous Integration and Deployment with easy setup and maintenance.
    TL;DR: Your continuous integration platform (CICD) will host all the quality tools (e.g. test, lint) so it should come with a vibrant ecosystem of plugins. Jenkins used to be the default for many projects as it has the biggest community along with a very powerful platform at the price of a complex setup that demands a steep learning curve. Nowadays, it has become much easier to set up a CI solution using SaaS tools like CircleCI and others. These tools allow crafting a flexible CI pipeline without the burden of managing the whole infrastructure. Eventually, it's a trade-off between robustness and speed - choose your side carefully.

    #Continuous Integration #Continuous Deployment #DevOps Tools 61 social mentions

Discuss: Node.js best practices list (July 2021)

Log in or Post with