Ember FastBoot App Server

4.1.4 · active · verified Sun Apr 19

fastboot-app-server is a dedicated application server designed for deploying and running Ember FastBoot applications in production environments. It provides robust capabilities for managing the lifecycle of an Ember app, including downloading new builds, automatically scaling across CPU cores using Node.js clustering, and seamlessly detecting and hot-reloading new application versions without downtime. The current stable version is 4.1.4. The project maintains a steady release cadence with frequent patch updates and less frequent major versions, with v4.0.0 released in early 2024. Key differentiators include its built-in extensibility, allowing developers to customize how app builds are downloaded (Downloader), how new versions are detected (Notifier), and even swap out the underlying HTTP server implementation (e.g., using Express) to integrate custom middleware or routing. It aims to simplify the operational aspects of server-side rendering Ember applications.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to initialize and start a FastBoot App Server with common configuration options such as distPath, gzip, host, port, custom sandbox globals, logging, and chunked responses.

const FastBootAppServer = require('fastboot-app-server');

const MY_GLOBAL = 'MY GLOBAL';

let server = new FastBootAppServer({
  distPath: 'dist',
  gzip: true, // Optional - Enables gzip compression.
  host: '0.0.0.0', // Optional - Sets the host the server listens on.
  port: 4000, // Optional - Sets the port the server listens on (defaults to the PORT env var or 3000).
  buildSandboxGlobals(defaultGlobals) { // Optional - Make values available to the Ember app running in the FastBoot server, e.g. "MY_GLOBAL" will be available as "GLOBAL_VALUE"
    return Object.assign({}, defaultGlobals, { GLOBAL_VALUE: MY_GLOBAL });
  },
  log: true, // Optional - Specifies whether the server should use its default request logging. Useful for turning off default logging when providing custom logging middlewares
  chunkedResponse: true // Optional - Opt-in to chunked transfer encoding, transferring the head, body and potential shoeboxes in separate chunks. Chunked transfer encoding should have a positive effect in particular when the app transfers a lot of data in the shoebox.
});

server.start();

view raw JSON →