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

lws-static

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lws-static

Lws middleware wrapper for koa-static

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46K
decreased by-12.22%
Maintainers
1
Weekly downloads
 
Created
Source

view on npm npm module downloads Gihub repo dependents Gihub package dependents Node.js CI js-standard-style

lws-static

Lws middleware plugin to serve static files, wraps koa-static. See here for usage instrutions.

Adds the following options to lws.


--directory, -d path           Root directory, defaults to the current directory.
--static.maxage number         Cache max-age (in seconds) applied to all resources served.
--static.defer                 If true, serves after `await next`, allowing any downstream middleware to
                               respond first.
--static.index path            Default file name, defaults to `index.html`.
--static.extensions ext        One or more default filename extensions. For example, if you set
                               `--static.extensions html` and request `/page` then the server will look for
                               both `page` and `page.html` on disk, serving the latter.

© 2016-24 Lloyd Brookes <75pound@gmail.com>.

Keywords

FAQs

Package last updated on 01 Aug 2024

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