@@ -17,8 +17,8 @@ Ingest is a lightweight, flexible server framework that brings the familiar Expr
1717- ** 🚀 Serverless-First** : Designed specifically for serverless environments while maintaining compatibility with traditional servers
1818- ** 🔄 Event-Driven** : Built on a robust event system that enables reactive programming patterns
1919- ** 🛣️ Multi-Routing Interface** : Four different routing approaches in one framework
20- - ** 🔌 Plugin System** : Highly extensible with a simple plugin architecture
21- - ** 📦 Build Support** : Exposes routing information for bundlers and build tools
20+ - ** 🔌 Plugin System** : Optional automatic wiring for routes, hooks, and shared services
21+ - ** 📦 Build Support** : Exposes routing information for build and deployment tooling
2222- ** 🌐 Cross-Platform** : Works with Node.js HTTP, WHATWG Fetch, and various serverless platforms
2323
2424## Installation
@@ -91,7 +91,7 @@ app.entry.get('/users', './routes/users.js');
9191```
9292
9393### 3. Import Router (Lazy Loading)
94- Dynamic imports for code splitting :
94+ Dynamic imports for lazy loading and tooling-aware route boundaries :
9595
9696``` typescript
9797app .import .get (' /users' , () => import (' ./routes/users.js' ));
@@ -110,7 +110,7 @@ Ingest can automatically determine which router to use based on your input:
110110
111111``` typescript
112112// Automatically uses action router
113- app .get (' /users' , (req , res ) => { /* handler */ });
113+ app .get (' /users' , ({ req , res } ) => { /* handler */ });
114114
115115// Automatically uses import router
116116app .get (' /users' , () => import (' ./routes/users.js' ));
@@ -121,14 +121,14 @@ app.get('/users', './views/users.hbs');
121121
122122## Plugin System
123123
124- Ingest features a powerful plugin system that allows you to modularize your application :
124+ Ingest includes an optional plugin system that can automate application wiring. You can still wire routes, handlers, and services manually in a main file if you prefer :
125125
126126### Creating a Plugin
127127
128128``` typescript
129129// src/plugins/auth.ts
130130export default function authPlugin(server ) {
131- server .on (' request' , (req , res ) => {
131+ server .on (' request' , ({ req , res } ) => {
132132 // Add authentication logic
133133 if (! req .headers .get (' authorization' )) {
134134 res .setError (' Unauthorized' , {}, [], 401 );
@@ -171,12 +171,12 @@ Ingest is built on a powerful event system that allows for reactive programming:
171171
172172``` typescript
173173// Listen to all requests
174- app .on (' request' , (req , res ) => {
174+ app .on (' request' , ({ req , res } ) => {
175175 console .log (` ${req .method } ${req .url .pathname } ` );
176176});
177177
178178// Listen to specific routes
179- app .on (' GET /api/users' , (req , res ) => {
179+ app .on (' GET /api/users' , ({ req , res } ) => {
180180 // This runs for GET /api/users
181181});
182182
@@ -238,7 +238,7 @@ export const handler = async (event, context) => {
238238
239239## Build Support
240240
241- Ingest exposes routing information that can be used by bundlers and build tools :
241+ Ingest exposes routing information that can be used by build and deployment tooling :
242242
243243``` typescript
244244const app = server ();
@@ -252,17 +252,20 @@ console.log(app.entries); // File entries
252252console .log (app .views ); // View templates
253253```
254254
255- This information can be used by bundlers to:
255+ This information can be used by tooling to:
256256- Pre-bundle route modules
257257- Generate static route manifests
258- - Optimize code splitting
258+ - Discover import, entry, and view boundaries
259259- Create deployment artifacts
260260
261261## Documentation
262262
263- - [ API Reference] ( ./docs/api/README.md ) - Complete API documentation
264- - [ Examples] ( ./docs/examples.md ) - Comprehensive usage examples
265- - [ Plugin Development] ( ./docs/plugin-development.md ) - Guide to creating plugins
263+ - [ Specifications] ( ./specs/README.md ) - Documentation index
264+ - [ Overview] ( ./specs/overview.md ) - What Ingest is optimizing for
265+ - [ Concepts] ( ./specs/concepts/README.md ) - How the system works
266+ - [ Guides] ( ./specs/guides/README.md ) - Task-oriented documentation
267+ - [ API Reference] ( ./specs/api/README.md ) - Exact class and method lookup
268+ - [ Examples] ( ./specs/examples.md ) - Example workspace guide
266269
267270## Examples
268271
0 commit comments