diff --git a/app/docs/page.tsx b/app/docs/page.tsx
index ebbf49c..b064003 100644
--- a/app/docs/page.tsx
+++ b/app/docs/page.tsx
@@ -1,21 +1,31 @@
-import { Button } from "@/components/ui/button"
-import Link from "next/link"
+import { Button } from "@/components/ui/button";
+import Link from "next/link";
export default function DocsHome() {
- return (
-
-
Welcome to Eframix Documentation
-
- Eframix is a minimalistic Node.js framework inspired by Express.js, offering core routing, middleware, and JSON body parsing features with zero dependencies.
-
-
-
-
-
-
- )
-}
\ No newline at end of file
+ return (
+
+
+ Welcome to Eframix Documentation
+
+
+ Eframix is a minimalistic Node.js framework inspired by Express.js,
+ offering core routing, middleware, and JSON body parsing features with
+ zero dependencies.
+
+
+
+
+
+
+ );
+}
diff --git a/app/docs/routing/page.tsx b/app/docs/routing/page.tsx
index a11c4f5..703c7d6 100644
--- a/app/docs/routing/page.tsx
+++ b/app/docs/routing/page.tsx
@@ -7,99 +7,109 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
export const metadata: Metadata = {
- title: "Routing | Eframix",
- description: "Learn how to define routes in your Eframix application.",
+ title: "Routing | Eframix",
+ description: "Learn how to define routes in your Eframix application.",
};
export default function Routing() {
- return (
-
-
- Routing
-
-
- Learn how to define routes in your Eframix application.
-
+ return (
+
+
+ Routing
+
+
+ Learn how to define routes in your Eframix application.
+
-
-
- Routing Overview
-
-
-
- Eframix allows you to define routes for handling HTTP requests. Below are examples of how to handle different HTTP methods:
-
+
+
+ Routing Overview
+
+
+
+ Eframix allows you to define routes for handling HTTP requests.
+ Below are examples of how to handle different HTTP methods:
+
- {/* GET Request */}
-
GET Request
-
- The `GET` method is used to retrieve data from the server. Below is an example of how to define a `GET` route:
-
- GET Request
+
+ The `GET` method is used to retrieve data from the server. Below is
+ an example of how to define a `GET` route:
+
+ {
res.end('Home Page');
});
`.trim()}
- />
-
- In this example, the root route ('/') responds with the text "Home Page".
-
+ />
+
+ In this example, the root route ('/') responds with the
+ text "Home Page".
+
-
GET Request - About Page
-
- You can also define additional `GET` routes like this:
-
-
+ GET Request - About Page
+
+
+ You can also define additional `GET` routes like this:
+
+ {
res.end('About Page');
});
`.trim()}
- />
-
- Here, the `/about` route will return "About Page" when accessed.
-
+ />
+
+ Here, the `/about` route will return "About Page" when
+ accessed.
+
- {/* POST Request */}
-
POST Request
-
- The `POST` method is used to send data to the server. Below is an example of how to define a `POST` route:
-
- POST Request
+
+ The `POST` method is used to send data to the server. Below is an
+ example of how to define a `POST` route:
+
- In this example, when data is sent to the `/api/data` route, the server responds with a JSON object confirming receipt.
-
-
-
+ />
+
+ In this example, when data is sent to the `/api/data` route, the
+ server responds with a JSON object confirming receipt.
+
+
+
-
- These examples demonstrate how to define routes for different HTTP methods and paths. Feel free to explore and customize your routes based on your application needs.
-
+
+ These examples demonstrate how to define routes for different HTTP
+ methods and paths. Feel free to explore and customize your routes based
+ on your application needs.
+
-
-
-
-
-
- );
+
+
+
+
+
+ );
}
diff --git a/app/docs/write-middleware/page.tsx b/app/docs/write-middleware/page.tsx
index ac57ab5..ecba656 100644
--- a/app/docs/write-middleware/page.tsx
+++ b/app/docs/write-middleware/page.tsx
@@ -7,51 +7,56 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
export const metadata: Metadata = {
- title: "Writing Middleware | Eframix",
- description: "Learn how to write custom middleware for your Eframix application.",
+ title: "Writing Middleware | Eframix",
+ description:
+ "Learn how to write custom middleware for your Eframix application.",
};
export default function WriteMiddleware() {
- return (
-
-
- Writing Middleware
-
-
- Learn how to write custom middleware for your Eframix application.
-
+ return (
+
+
+ Writing Middleware
+
+
+ Learn how to write custom middleware for your Eframix application.
+
-
-
- What is Middleware?
-
-
-
- Middleware is a function that has access to the request, response, and the next middleware function in the application's request-response cycle. It can perform various tasks such as:
-
-
-
Executing code.
-
Modifying the request and response objects.
-
Ending the request-response cycle.
-
Calling the next middleware function in the stack.
-
-
- Middleware can be used for various purposes, including logging, authentication, error handling, and more.
-
-
-
+
+
+ What is Middleware?
+
+
+
+ Middleware is a function that has access to the request, response,
+ and the next middleware function in the application's
+ request-response cycle. It can perform various tasks such as:
+
+
+
Executing code.
+
Modifying the request and response objects.
+
Ending the request-response cycle.
+
Calling the next middleware function in the stack.
+
+
+ Middleware can be used for various purposes, including logging,
+ authentication, error handling, and more.
+
+
+
-
-
- Custom Logging Middleware
-
-
-
- Below is an example of a simple logging middleware that logs the request method and URL along with the timestamp.
-
-
+
+ Custom Logging Middleware
+
+
+
+ Below is an example of a simple logging middleware that logs the
+ request method and URL along with the timestamp.
+
- This middleware logs the method and URL of every incoming request to the console.
-
-
-
+ />
+
+ This middleware logs the method and URL of every incoming request to
+ the console.
+
+
+
-
-
-
-
-
- );
+
+
+
+
+
+ );
}
diff --git a/app/page.tsx b/app/page.tsx
index 574a772..7e07ed8 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,9 +1,9 @@
-import { ArrowRight, Github } from "lucide-react"
-import Link from "next/link"
+import { ArrowRight, Github } from "lucide-react";
+import Link from "next/link";
-import CopyCommand from "@/components/CommandCopy"
-import { Button } from "@/components/ui/button"
-import { Card, CardContent } from "@/components/ui/card"
+import CopyCommand from "@/components/CommandCopy";
+import { Button } from "@/components/ui/button";
+import { Card, CardContent } from "@/components/ui/card";
export default function Home() {
return (
@@ -15,8 +15,8 @@ export default function Home() {
Eframix
- A minimalistic Node.js framework inspired by Express.js, offering core
- routing, middleware, and JSON body parsing features with zero
+ A minimalistic Node.js framework inspired by Express.js, offering
+ core routing, middleware, and JSON body parsing features with zero
dependencies. Ideal for lightweight HTTP server applications.
@@ -29,7 +29,11 @@ export default function Home() {
- )
+ );
}
const features = [
{
title: "Lightweight",
- description: "Zero dependencies for a minimal footprint and fast performance.",
+ description:
+ "Zero dependencies for a minimal footprint and fast performance.",
icon: ({ className }: { className?: string }) => (