Skip to content

Add Built-in Static File Serving Support in Yelix #17

@GroophyLifefor

Description

@GroophyLifefor

Problem

Currently, Yelix does not provide built-in support for serving static files. Users must manually implement middleware or custom routes to serve assets like HTML, CSS, JS, images, and other static files. This adds extra complexity for users who need a simple way to serve static content.

Proposed Solution

Introduce a built-in static file serving function that allows users to serve a directory with minimal configuration.

Suggested API

const app = new Yelix();

app.serveStatic("./public"); // Serves files from the ./public directory

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions