New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
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

koa

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