This package provides an Express.js middleware for rendering Ember.js applications on the server side using FastBoot. It allows developers to integrate server-side rendering (SSR) capabilities into existing Express.js applications, primarily for SEO, improved initial page load performance, and serving non-JavaScript clients. The current stable version is 4.1.2. While there isn't a strict public release cadence, it typically follows major Ember/FastBoot updates and critical bug fixes, with `v3.0.0` introducing significant breaking changes. Its key differentiator is its direct integration with Express, offering maximum flexibility for users who prefer to manage their own server stack, in contrast to the more opinionated `FastBoot App Server`. It's designed for scenarios where an existing Express server needs to incorporate Ember FastBoot rendering without adopting a full FastBoot-specific server solution.
npm install fastboot-express-middlewareVerified import paths — ran on the pinned version, not inferred.
This quickstart sets up a basic Express server that serves static assets from an Ember app's `dist` directory and then uses `fastboot-express-middleware` to render Ember applications on all remaining routes, demonstrating a minimal SSR setup.
Upgrade Node.js to a supported version (12.*, 14.*, or >=16) or pin `fastboot-express-middleware` to a version prior to 3.0.0.
Review the changelog for `fastboot@3.1.0` and `ember-cli-fastboot` for any potential incompatibilities with your Ember application. Test thoroughly after upgrading.
If you need to customize error responses, handle errors *before* the `fastbootMiddleware` or disable `resilient` mode to allow 500 status codes for render errors.
Ensure `ember-cli-fastboot` is installed in your Ember project and run `ember build` before deploying your Express application. Verify `distPath` in your middleware configuration is correct.
Run `npm install fastboot-express-middleware` or `yarn add fastboot-express-middleware` in your project directory.
Ensure your Ember application has `ember-cli-fastboot` installed and run `ember build`. Then, verify that the `distPath` option in your middleware configuration correctly points to the `dist` folder of your built Ember app.
Ensure you have `const express = require('express');` and `let app = express();` correctly set up before using `app.get` or `app.use`.