@keystone-next/app-static-legacy

5.1.5 • Public • Published

Static file app

View changelog

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

Usage

const { Keystone } = require('@keystone-next/keystone-legacy');
const { GraphQLApp } = require('@keystone-next/app-graphql-legacy');
const { AdminUIApp } = require('@keystone-next/app-admin-ui-legacy');
const { StaticApp } = require('@keystone-next/app-static-legacy');

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

Config

Option Type Required Description
path string true The path to serve files from.
src string true The path to the folder containing static files.
fallback string false The path to the file to serve if none is found. This path is resolved relative to the src path.

Readme

Keywords

none

Package Sidebar

Install

npm i @keystone-next/app-static-legacy

Weekly Downloads

0

Version

5.1.5

License

MIT

Unpacked Size

7.9 kB

Total Files

4

Last publish

Collaborators

  • emmatown
  • jedwatson
  • bladey