Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ember-cli-fastboot changelog

## Unreleased

### Added
* allow reading sandboxGlobals from app's config/environment

## 1.1.0

* Bumping `fastboot-express-middleware` to 1.1.0
* Bumping `fastboot-express-middleware` to 1.1.0
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ module.exports = {
serverMiddleware(options) {
let emberCliVersion = this._getEmberCliVersion();
let app = options.app;
let appConfig = this._getHostAppConfig();

if (emberCliVersion.gte('2.12.0-beta.1')) {
// only run the middleware when ember-cli version for app is above 2.12.0-beta.1 since
Expand All @@ -306,11 +307,12 @@ module.exports = {
if (req.serveUrl && enableFastBootServe) {
// if it is a base page request, then have fastboot serve the base page
if (!this.fastboot) {
// TODO(future): make this configurable for allowing apps to pass sandboxGlobals
// and custom sandbox class
let fastbootConfig = appConfig.fastboot || {};
this.ui.writeLine(chalk.green('App is being served by FastBoot'));
this.fastboot = new FastBoot({
distPath: outputPath
distPath: outputPath,
sandbox: fastbootConfig.sandbox,
sandboxGlobals: fastbootConfig.sandboxGlobals
});
}

Expand Down