Express Typescript

screenshot of Express Typescript
express
bootstrap

Express Typescript

Express + TypeScript + Boilerplate for Web / API App

Overview

This product is a boilerplate for a Node.js app built using the Express.js web framework. It utilizes TypeScript for writing the app's logic and takes advantage of Node's Cluster API to handle load on multi-core systems. The boilerplate includes various packages for different functionalities such as storing custom constant configurations, database management using MongoDB, caching, routing, authentication, logging, exception handling, views with PUG template engine, and background queues with Kue.

Features

  • Express.js Web Framework: Built using Express.js, a popular web framework for Node.js.
  • TypeScript Support: Written in TypeScript, allowing for enhanced code organization and error checking.
  • Multi-Core Support: Utilizes Node's Cluster API to take advantage of multi-core systems and handle load efficiently.
  • Environment Configuration: Uses DotEnv package to store custom constant configurations within the process.env.
  • Database Management: Includes Mongoose, a MongoDB object modeling package for Node.js, for seamless database interactions.
  • Caching: Utilizes memory-cache, a simple in-memory cache for Node.js.
  • Routing: Includes express-router for handling routing and has distributed routes into two files: Web Routes and API Routes.
  • Route Authentication Middleware: Configures Web routes with CSRF Token and API routes with JSON Web Token for secure authentication.
  • Authentication Strategies: Utilizes Passport.js, a compatible authentication middleware for Node.js, for implementing authentication strategies.
  • Logging: Includes a custom Log class built in middlewares folder for logging and manages log files by date, removing them after a specified number of days.
  • Exception Handling: Includes two classes, Handler and NativeEvent, for handling and logging exceptions.
  • View Rendering: Uses the PUG template engine for rendering views.
  • Background Queues: Includes the use of Kue for handling background queues.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

bootstrap
Bootstrap

Bootstrap is the most popular CSS Framework for developing responsive and mobile-first websites.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

Pug

Pug is a high-performance template engine for Node.js and browsers that enables developers to write HTML templates using a concise and intuitive syntax. It supports a range of features, including template inheritance, conditionals, loops, mixins, and more, and can be easily integrated into a variety of web frameworks and build tools.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.