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

koa-static-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-static-api

this koa middleware for static content. Work with node.js version > 4

  • 0.5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Static file serving middleware. This module uses as dependency only core node.js modules. Position for this middleware do not important

Installation

$ npm install koa-static-api

API

var koa = require('koa');
var app = koa();
var staticFolder = require('koa-static-api')
app.use(staticFolder(opt));

Options

  • cache Browser cache max-age in milliseconds. Defaults to 'no-cache'
  • root root directory string. nothing above this root directory can be served. Defaults to '/public'
  • index index file. Defaults to 'index.html'

License

ISC

Keywords

FAQs

Package last updated on 29 Sep 2015

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