Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elysiajs/static

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elysiajs/static

Plugin for Elysia for serving static folder

  • 0.2.0-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-19.29%
Maintainers
1
Weekly downloads
 
Created
Source

@elysiajs/static

Plugin for elysia for serving static folder.

Installation

bun add @elysiajs/static

Example

import { Elysia } from 'elysia'
import { staticPlugin } from '@elysiajs/static'

const app = new Elysia()
    .use(staticPlugin())
    .listen(8080)

Config

Below is an available config for a static plugin.

path

@default "public"

Path to expose as a public path

prefix

@default '/public'

Path prefix to create a virtual mount path for the static directory

staticLimit

@defualt 1024

If total files exceed this number, the file will be handled via wildcard instead of the static route to reduce memory usage

alwaysStatic

@default boolean

If set to true, the file will always use a static path instead

Keywords

FAQs

Package last updated on 19 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc