apeman-app-contrib-servestatic

apeman app contribution plugin to server static files.


Keywords
apeman, app, static, serve
License
MIT
Install
npm install apeman-app-contrib-servestatic@1.1.4

Documentation

apeman-app-contrib-servestatic

apeman app contribution plugin to server static files.

Build Status Code Climate Code Coverage npm version

This package use serve-static module to serve static files in a directory.

Installation

Install module via npm

$ npm install apeman-app-contrib-servestatic --save

Usage

Define an app at $apps property in your Apemanfile.

/**
 * This is example Apemanfile to use "apeman-app-contrib-servestatic".
 * @see https://www.npmjs.com/package/serve-static
 */

"use strict";

module.exports = {
    $pkg: {/*...*/},
    $apps: {
        // Define app.
        "my-awesome-app": {
            "/api/somepoint": [
                require("apeman-app-contrib-servestatic")("public", "public/html", {
                     "extensions": ['html', 'htm']
                })
            ]
        }
    }
};

Then, run the app via apeman app command.

// This will start development server to for the defined app.
$ apeman app  --port 3050

Options

Name type Description
dotfiles String How to treat dotfiles. 'allow', 'deny', or 'ignore'.
etag String Enable or disable etag generation.
extensions String Set file extension fallbacks.

License

This software is released under the MIT License.

Links