Virtual Filesystem & Bootstrap
Understand how Dinou maps custom path aliases and caches the project directory tree in-memory to eliminate disk read latency.
Group Summary:
• Paths alias register:./dinou/core/register-paths.js
• Virtual filesystem:./dinou/core/vfs.js
💡 Overview
Before the server starts loading components or routing incoming requests, it must bootstrap the runtime environment:
- Alias Mapping: Imports inside files that use custom path configurations (e.g.
import Component from "@/components/Component") will fail unless Node is taught how to parse these alias patterns. - Filesystem Optimization: Constantly performing disk operations (like
fs.existsSync) for routing lookups degrades server throughput. The framework must implement memory-level caches to avoid disk latency in production.
The Virtual Filesystem & Bootstrap group contains the core configuration files responsible for these startup tasks.
📊 Server Startup Flow
The diagram below traces the bootstrapping sequence executed when the server process starts:
📂 Module Directory
Explore each component file in detail: