Skip to content

v-hono/v-hono-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hono_static

Static file serving for v-hono-core framework.

Features

  • Serve static files from local filesystem
  • File caching support
  • MIME type detection
  • Directory indexing (optional)

Installation

v install --git https://github.com/v-hono/v-hono-core
v install --git https://github.com/v-hono/v-hono-static

Usage

import hono
import hono_static

fn main() {
    mut app := hono.Hono.new()

    // Serve files from ./public directory at /static path
    app.use(hono_static.serve_static(hono_static.StaticOptions{
        root: './public'
        path: '/static'
    }))

    app.listen(':3000')
}

Dependencies

  • hono - Core framework

License

MIT

About

High-performance static file serving middleware for v-hono.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors