node, express, app

Standard Node app stack

An opinionated list of components to build Node applications

Motivation

We have spent hundreds of hours researching "the best" technology to build our software. Sometime the choices are more obvious but most of the time there are many fantastic languages, frameworks, environments and applications out there and if you are trying to find "the best" you risk you will never settle.

So we decided to share our list of technologies of choice to help you save time and avoid agonising which framework to choose.

Are we choosing "the best"? We don't think this is even the right questions to ask. What "the best" means is relative: speed, maintainability, security, hardware requirements, technological burden... there are just too many factors and different use cases. Developers and companies may have different views on their relative importance.

Instead of looking for "the best" we decided to settle for the stack which we think is overall solid, mainstream, has huge open source community and... we simply like to use. We no longer agonise whether to choose Express over Fastify over Hapi... we made our mind, we are happy with our choices and we share our list with you.

If you don't choose all the elements below, we hope at least this list will at least serve as a useful reference framework. If you are having trouble deciding between any particular components, this may help you make up your mind.

Basics

Node.js

Node is our environment of choice. The main reasons we choose Node are:

  1. same language for the client and the server - code can be re-used and same developers can work on both sides of the stack Node runs
  2. fantastically on serverless architecture including AWS Lambda functions - this is how serverless stared
  3. massive open source community

Yarn

Yarn is our Node package manager of choice and we prefer it over npm. See our Yarn vs npm comparison.

Express

Node js application framework. Express is not the newest, not the fastest but it is probably still the most widely used Node framework. Express is light, unopinionated, mature and simple. There is a large number of packages available for Express.

Nunjucks

Templating engine. We think Nunjucks are the most "complete" templating engine for JavaScript. Nunjucks may not be the fastest or the leanest but it comes with a very powerful set of features out of the box, allows for inheritance, autoescaping and has several built-in filters. So far it does everything we need it to do out of the box, unlike many alternatives which are perhaps simpler to start with but you run into limitations very quickly.

Tutorial on how to integrate Nunjucks and Express

Database

Knex

We use Knex for database migrations.

Objection

Object-relational-mapping or relational query builder for Node.js

Processing text server side

Unified

Parsing markdown server-side to deliver SEO optimised pages.

Katex

Display mathematic formulae

Code development

Nodemon Automatically monitor for code changes in development and restart your Node app. Nodemon indispensible in developing Node apps. Learn hot to integrate nodemon into Express app.

Standard

Standard is an opinionated, zero-configuration code linter. Stop wasting time on arguing over how to format your code. Forget about fiddling around setting up linting rules in config files. Standard allows you to run linting and fixing out of the box. It is used by many major players including Node.js, Express and Github.

Learn how to integrate Standard into an Express app.

Front-end assets

This article is primarily about the server side stack. So the below is just a short list of key front-end technologies we like to use.

Bootstrap

The world's most popular css framework. See how to integrate Bootstrap with an Express app to create custom themes.

Vuejs

Front-end progressive JavaScript framework. The main advantage is that it scales really well - you can build a single animate button with Vue as well as a fully fledged complex single-page application.

Powered by

Node
Github
Copyright 2019 - present