6.0.8 • Published 3 years ago

@itoa/app-static v6.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Static file app

This is the last active development release of this package as Itoa 5 is now in a 6 to 12 month active maintenance phase. For more information please read our Itoa 5 and beyond post.

View changelog

A ItoaJS app to serve static files such as images, CSS and JavaScript with support for client side routing.

Usage

const { Itoa } = require('@itoa/itoa');
const { GraphQLApp } = require('@itoa/app-graphql');
const { AdminUIApp } = require('@itoa/app-admin-ui');
const { StaticApp } = require('@itoa/app-static');

module.exports = {
  itoa: new Itoa(),
  apps: [
    new GraphQLApp(),
    new AdminUIApp(),
    new StaticApp({
      path: '/',
      src: 'public',
      fallback: 'index.html',
    }),
  ],
};

Config

OptionTypeRequiredDescription
pathstringtrueThe path to serve files from.
srcstringtrueThe path to the folder containing static files.
fallbackstringfalseThe path to the file to serve if none is found. This path is resolved relative to the src path.
6.0.8

3 years ago

6.0.7

3 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.2.3

4 years ago

5.2.2

4 years ago