Skip to content
KeystoneJS LogoKeystoneJSv5

Static File App

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



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

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



The path to serve files from. This is required and must be a string.


The path to the folder containing static files. This is required and must be a string.

fallback (optional)

The path to the file to serve if none is found. This path is resolved relative to the src path.

Have you found a mistake, something that is missing, or could be improved on this page? Please edit the Markdown file on GitHub and submit a PR with your changes.

Edit Page