You can access the current version of the book in the chapters directory or in PDF format (both Light and Dark modes are available) by clicking here. Note that this version includes the current release of the content, and is not the final version.
This book is still in a very early stage. It contains an insignificant portion of the total content that the book is supposed to cover.
There’s going to be 0 dependencies for our backend framework, as well as our logging library. Everything will be done using vanilla Node.js, the hard-way (the best way to learn).
I've found that one of the best ways to get a handle on a new concept is to start from scratch. Begin with nothing, and build it up yourself. This approach lets you not only learn how it works, but also understand why it works that way.
This isn't any normal Node.js tutorial or guide. It's a detailed walkthrough, and a code along experience that shows you how to create a backend framework from the ground up while getting a solid grasp of Node.js's inner workings and it’s standard library.
In this guide, we will not only build a web framework, but also focus on designing a powerful and optimized end product that is ready for use in production applications (somewhat). Our goal is to create a modular backend framework that can be easily extended with new features as needed.
We will cover topics like error handling, security, and testing to ensure that our framework is reliable and secure. We will explore different approaches to modularity and demonstrate how to create reusable components that can be shared across multiple projects. By the end of this guide, you will have a solid understanding of Node.js and it’s tough parts.
I highly recommend coding along with this guide rather than just reading it.
The repo for our backend framework- Velocy
- What the hell is a web server any way?
- Your first web server with node.js
- Working with files
logtar
- Our Own logging library- Initializing a new project
- A little about
SemVer
- Creating a LogLevel class
- The Logger class
- Encapsulation with private fields
- The
LogConfig
class - Design Patterns
jsdoc
comments- The
RollingConfig
class - Finishing up the
RollingConfig
class - Let's recap
- Adding more useful methods in the
LogConfig
class - Why
readFileSync
?
- Refactoring the code
- Writing Logs
- Capturing metadata
- A small intro to
async
vssync
- Adding Rolling File Support
- HTTP Deep Dive
- HTTP Verbs, Versioning and the benefits of
HTTP/1.1
- User Agents
- MIME Type and
Content-Type
- Headers
- Request headers
- Response Headers
- Response and Status Codes
velocy
our backend framework