I feel like I’ve had the misfortune of re-learning this topic over and over so I’ll document the process this time. Besides, since google is discontinuing Google Sign-In, I have to do a new implementation anyway. We are discontinuing the Google…
A technique to avoid distracting websites during the work day for mac users.
We continue building our Expressjs project by adding the capability for automatic documentation generation via a popular library called JSDoc. You will learn how to set it up, how to document your code in a format to be used by the library, and also learn of a plugin to customize the look of your generated documents.
While writing code, we need to ensure that the updates do not break existing code. Rather than manually running tests each time we make code changes, we will learn a format to define tests and have them automatically run when we make changes. We will us a popular library called Jest, along with two utilities to make network requests, and an in-memory mongodb instance written for Jest-testing.
Any webpage/app which allows for multiple users needs a mechanism to support different user accounts. Our express app will also support this and we will leverage a feature built into our framework, namely middleware, and a commonly used client component, cookies. We will also make our setup more robust by leveraging a popular package which allows for secure, and tamper- proof cookies.
An important aspect of any application, is data storage. For that, we will use a non-sql database called mongoDB. To link our express app we will use the popular native mongoDB driver and this post will show you how to configure it.
While setting up our Express app template, we will start by setting up our logging system. To do this, we will use two popular libraries. One which automatically logs request information when used as an express middleware, and another which formats and configures log formats and types.
As we begin our Expressjs app, we will start with setting up how the app is run. This will determine configuration, performance attributes, logging, etc. This will allow our app to run optimally in different situations, including testing, development, and production.
This is the beginning of a series of articles focused on learning and building a complete nodejs server-side environment based on the expressjs framework. This first article focuses on setup of the development environment, specifically using a popular style guide, a library to catch code problems while writing code, and a formatter to have a consistance code look.