Building a Node.js Web Server in One Article
Building a Node.js web server from scratch — covering HTTP module, URL parsing, query, headers, cookies, useragent, body parsing, file upload, CORS, redirect, and the qiao-z framework.
Type to start searching
Building a Node.js web server from scratch — covering HTTP module, URL parsing, query, headers, cookies, useragent, body parsing, file upload, CORS, redirect, and the qiao-z framework.
Preface: How to determine if a user is online — not just whether the network is connected. Online means connected to the internet; connected means on a network but without internet access. This article covers detection methods for both Node.js and browser environments.
Preface Some common methods for local data storage include Cookie, LocalStorage, IndexedDB, SQLite, etc. Here is a brief comparison. Cookie Storage size: 4k. Set expiration: Yes. Server-side access: Yes. Feature: Simple data storage. LocalStorage Storage size: 5M. Set expiration: No. Server-side access: No.
Preface: The powerful vitality of JavaScript has expanded frontend development into many areas — web development with JS/HTML/CSS, server-side development with Node.js, desktop development with Chromium and Node.js, and mobile development with WebView.
Introduction: IndexedDB is a database that can be used directly on the web. This article covers IndexedDB basics, comparison with LocalStorage, database and table operations, data CRUD operations, the qiao.db.js utility, and building a todolist with IndexedDB.
Preface This article walks through building a todolist based on the following tech stack: React for UI, https://reactjs.org/ webpack for building the frontend project, https://webpack.js.org/ localStorage for data storage, https://developer.mozilla.
Exploring how to efficiently run parallel tasks in JavaScript — covering use cases, task pools, callbacks, IIFE pattern, multi-process, and multi-thread approaches.
Preface Web frontend development relies heavily on webpack. As we all know, webpack has many complex configurations — you could even have a dedicated "webpack configuration engineer." This article focuses on webpack core concepts and commonly used configurations in business development, aiming to teach you webpack usage and configuration in one article.
Introduction: LocalStorage is a browser-based local storage API. This article covers LocalStorage basics, comparison with cookies, storing numbers and objects, storage limits, setting expiration times, and the qiao.ls.js utility library.